Below code gives the shape of tensor as " torch.Size([])" after using torch.max function. Why output tensor is not having size "torch.Size([1])? and how can i convert it to that shape?
import torch
a=torch.tensor([1.0, 2.0])
b=torch.max(a)
print(b.shape)