I have problem about the latest PyTorch. For more details, refer to the Issue of PyTorch at pytorch/pytorch - GitHub. I wonder it is due to the latest Pytorch since the code has run correctly with pytorch 0.1.2.
If you need to know more about the test code which cause the freezing of PyTorch 0.2.0_1. Feel free to write an email to me. My email is jkaisun1@gmail.com
it is because you have installed the CUDA 7.5 version i think (and you have a pascal GPU).
Install the CUDA 8.0 version of pytorch 0.2.0 using the commands from http://pytorch.org and see if that fixes it.
After choose the following options of environment on pytorch.org: Linux, pip, Python 2.7, No CUDA
The following command are given from http://pytorch.org/ and I use it to install Pytorch 0.2.0_1: pip install http://download.pytorch.org/whl/cu75/torch-0.2.0.post1-cp27-cp27mu-manylinux1_x86_64.whl