This is happening because the latest version of torchvision i.e., 0.3, has C++ ops that have been compiled with some version of cuda. Pull request #971 on torchvision fixes this. I would recommend installing torchvision from source. The instructions can be found on the torchvision github repo.