scalar.ndim getting error #1323
Replies: 2 comments
-
|
You have not created a scalar tensor yet. Use torch.tensor() to make a scalar scalar = torch.tensor(9) This should work |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Actually along with above mentioned |
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.
-
Hi
when running scalar.ndim
in chapter 20 inro to pytorch tensors getting below error
AttributeError Traceback (most recent call last)
/tmp/ipython-input-2014850657.py in <cell line: 0>()
----> 1 scalar.ndim
AttributeError: 'int' object has no attribute 'ndim'
Thanks
Beta Was this translation helpful? Give feedback.
All reactions