Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy array to tensors

n = np.ones(5)
t = torch.from_numpy(n)
Source by pytorch.org #
 
PREVIOUS NEXT
Tagged: #numpy #array #tensors
ADD COMMENT
Topic
Name
5+7 =