Monday 21 October 2019

torch - convert numpy to a tensor

Converting NumPy Array to Torch Tensor ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

See how changing the np array changed the Torch Tensor automatically
[2. 2. 2. 2. 2.]
tensor([2., 2., 2., 2., 2.], dtype=torch.float64)

No comments:

Post a Comment