Creating Tensors - I don'T see tensor(7) as Daniel does #1013
-
Dears, scalarscalar = torch.tensor(7) but it gives me this ; instead of this; scalar = torch.Tensor(7) Where do I do mistake ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Ok I got it, I wrote T big in torch.Tensor(7), but it has to be small letter, torch.tensor(7) |
Beta Was this translation helpful? Give feedback.
-
Here’s why
import torch
scalar = torch.tensor(7)
print(scalar) |
Beta Was this translation helpful? Give feedback.
Ok I got it, I wrote T big in torch.Tensor(7), but it has to be small letter, torch.tensor(7)