Convert array to tensor

Hi,

how can i convert array to tensor in pytorch?

see 28809

1 Like

using : torch.from_numpy(numpy_array), you can convert a numpy array into tensor.
if you are using a list, use torch,Tensor(my_list)

1 Like