标签:fun func bsp sof softmax tor ORC soft cti
import torch
import torch.nn.functional as F
x1= torch.Tensor( [ [1,2,3,4],[1,3,4,5],[3,4,5,6]])
y11= F.softmax(x, dim = 0) #对每一列进行softmax
y12 = F.softmax(x,dim =1) #对每一行进行softmax
x2 = torch.Tensor([1,2,3,4])
y2 = F.softmax(x2,dim=0)
标签:fun func bsp sof softmax tor ORC soft cti
原文地址:https://www.cnblogs.com/shaxiaoshaxiao/p/9868057.html