RuntimeError: randperm is only implemented for CPU

I’m trying to implement this tutorial:
https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html

using GPU, and I’m facing this error message:
RuntimeError: randperm is only implemented for CPU

I know, there is an issue about that:

However, there are no suggestions on how to fix it… Any idea?

PyTorch 0.4, installed with conda

Hi,

There is a PR openned here for this.

solved here: