python - What is the difference between torch.tensor and torch.Tensor? - Stack Overflow
In PyTorch
torch.Tensor
is the main tensor class. So all tensors are just instances oftorch.Tensor
.When you call
torch.Tensor()
you will get an empty tensor without anydata
.In contrast
torch.tensor
is a function which returns a tensor.
あまり直接叩くことはないのだけど、どっちかと言うと小文字のほうを使っとけばいいかな?