softmax = torch.nn.Softmax(dim=1) tensor_input = torch.randn(3,4) print("The output for the softmax function is:","\n",softmax(tensor_input))
確定! 回上一頁