Pytorch RuntimeError: all tensors must be on devices[0]

NoSuchKey