Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy array to torch tensor

np_array = np.array(data)
x_np = torch.from_numpy(np_array)
Source by pytorch.org #
 
PREVIOUS NEXT
Tagged: #numpy #array #torch #tensor
ADD COMMENT
Topic
Name
9+8 =