Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to convert list into object and transform into tensors

py_list = [[1.,2.,3.,4.],[5.,6.,7.,8.],[9.,10.,11.,12.]]
pt_tensor_from_list = torch.FloatTensor(py_list)
Source by www.aiworkbox.com #
 
PREVIOUS NEXT
Tagged: #convert #list #object #transform #tensors
ADD COMMENT
Topic
Name
7+4 =