TypeError: expected CPU (got CUDA) when sublcassing / inheriting torch.Tensor class

Solution, according to the issue:

1 Like