For 0.4 above doesn’t work. To create a 0-dim tensor (i.e. scaler tensor as opposed to vector of 1 dimension), do this:
a = torch.tensor(3)
Yes capital T makes all the difference :).
 torch.Tensor  26 is an alias for the default tensor type ( torch.FloatTensor ).
A tensor can be constructed from a Python  list  2 or sequence using the  torch.tensor()  43 constructor