pytorch (四)F.softmax cross_entropy confusion_matrix stack
importnumpyasnpimporttorch.nn.functionalasFimporttorch>>>F.softmax(x,dim=0)tensor([[0.3333,0.3333,0.3333,0.3333,0.3333],[0.3333,0.3333,0.3333,0.3333,0.3333],[0.3333,0.3333,0.3333,0.3333,0.3333]])>>>xt