Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pytorch get tensor dimension

How do you find the dimension of a tensor PyTorch?
In PyTorch, there are two ways of checking the dimension of a tensor: . size() and . shape .
Note that the former is a function call, whereas the later is a property
 
PREVIOUS NEXT
Tagged: #pytorch #tensor #dimension
ADD COMMENT
Topic
Name
4+9 =