What is the difference between torch.Tensor([1,2,3])
and torch.tensor([1,2,3])
#277
Unanswered
shivammavihs
asked this question in
Q&A
Replies: 2 comments
-
Hi @shivammavihs, I didn't even know they created tensors in different data types! I'd say I use
|
Beta Was this translation helpful? Give feedback.
0 replies
-
The torch.tensor infers data type automatically whereas torch.Tensor assigns the default data type I think better explanation can be found in this discussion forum: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to understand what is the significance of each function
torch.Tensor([1,2,3])
andtorch.tensor([1,2,3])
.The one difference I found is torch.Tensor() creates tensors with int64 dtype and torch.tensor() creates float32 dtype by default. Is there any other significant difference between both.
And, when and where to use which one?
Beta Was this translation helpful? Give feedback.
All reactions