import torch
import torch.nn as nn
softmax = nn.Softmax(dim=1)
a = torch.tensor([[1,1.5, 1.2, 3], [5,1.5, 1.2, 3]])
print(softmax(a))
tensor([[0.0888, 0.1464, 0.1085, 0.6563],
[0.8418, 0.0254, 0.0188, 0.1139]])
import torch
print(torch.cuda.is_available())
False
print('hello')
hello