I’m trying to use torch.nn.functional.Softmax with Variable input, but getting an error. Where am I wrong?
a = np.random.randint(0,3,size=(10))
v = Variable(torch.from_numpy(a))
F.softmax(v)

Getting KeyError: <class ‘torch.LongTensor’>