Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

valueerror: only one element tensors can be converted to python scalars

# Return a list of tensor shapes:
>> [t.size() for t in my_list_of_tensors]

# Returns a list of numpy arrays:
>> [t.numpy() for t in my_list_of_tensors]
 
PREVIOUS NEXT
Tagged: #element #tensors #converted #python #scalars
ADD COMMENT
Topic
Name
6+9 =