Recently I ran into an error when I tried to convert an array into float tensor using
TypeError: tensor(): argument 'dtype' must be torch.dtype, not torch.tensortype
I checked out the documentation here and it turns out I did not have correct understanding about data type. I previously thought
torch.float is equivalent to
However, I still do not get the difference between those two and rationale behind this design, which appears to be redundant at first glimpse. Maybe
torch.FloatTensor depends on particular storage type whereas
torch.float doe not?