Which PyTorch version are you using?
You can check it using print(torch.__version__).
The current stable version is 1.1.0, so if you are using an older one, I would recommend to install the latest version following the instructions from the website 114.