PyTorch_Softmax
文章目录
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
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论