Hi,
Recently, I’ve been facing the same issue as in How to fix Mismatch in shape when using .backward() function
Originally, I use torch(.cuda).FloatTensor to create the tensor. Comparing it to the solution on the post, this is what I got
# using FloatTensor
a_one = torch.FloatTensor(1)
a_one
>>> tensor([0.])
a_one.dtype
>>> torch.float32

# using torch.tensor
b_one = torch.tensor
b_one
>>> tensor(1.)
b_one.dtype
>>> torch.float32

Can someone explain how both of this tensor initialization returns different shape of tensor?