What’s the meaning of RuntimeError: Expected a 'N2at13CUDAGeneratorE' but found 'PN2at9GeneratorE'
Traceback (most recent call last):
  File "train_cosine_iterations_distributed.py", line 335, in <module>
    batch_iterator = iter(train_loader)
  File "/home/ycg/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 819, in __iter__
    return _DataLoaderIter(self)
  File "/home/ycg/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 584, in __init__
    self._put_indices()
  File "/home/ycg/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 646, in _put_indices
    indices = next(self.sample_iter, None)
  File "/home/ycg/anaconda3/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 160, in __iter__
    for idx in self.sampler:
  File "/home/ycg/anaconda3/lib/python3.6/site-packages/torch/utils/data/distributed.py", line 45, in __iter__
    indices = torch.randperm(len(self.dataset), generator=g).tolist()
RuntimeError: Expected a 'N2at13CUDAGeneratorE' but found 'PN2at9GeneratorE'