Anyone can tell me the difference between torch.Tensor and torch.tensor?How to choose which one to use?Thanks!
I would recommend to use
torch.tensor to initialize your tensor with values, as e.g. the dtype will be inferred automatically, while
torch.float32 by default as far as I know.
Thanks your reply!Do you know the difference about their?Thanks!
torch.Tensor is the legacy abstraction.
Have a look at these docs for info how to properly create tensors now.