关于pytorch:PyTorchSoftmax

Softmax

代码

import torch
import torch.nn as nn

softmax = nn.Softmax(dim=1) 
input = torch.randn(1, 10) 
output = softmax(input) 
print(output.size())

torch.Size([1, 10])
                  

援用

<1>

torch=1.7.1+cu101
torchvision=0.8.2
torchaudio=0.7.2

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理