PyTorch Forums
Testing is Tensor
episodeyang
(Ge Yang)
August 15, 2017, 7:47pm
1
The standard way is to use
import torch torch.is_tensor(x)
1 Like