Video "PyTorch Fundamentals" - what is "ndim" for a tensor? #1186
Unanswered
fouadbenbrahim217
asked this question in
Q&A
Replies: 1 comment
-
In PyTorch, .ndim or tensor.ndimension() returns the number of dimensions of a tensor. For example: import torch
torch.rand(11, 2222).ndim # Output will be 2 , has 2 dims(axes)
torch.rand(11, 2222, 333).ndim # Output will be 3 |
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.
-
Hello i'm having trouble on vedio XYZ...
Code:
'''python
import torch
torch.randn(3,3)
'''
Beta Was this translation helpful? Give feedback.
All reactions