记录的崩溃日志,供大家参考一下:
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 260, in cuda
return self._apply(lambda t: t.cuda(device))
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 193, in _apply
param.data = fn(param.data)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 260, in
return self._apply(lambda t: t.cuda(device))
File "/usr/local/lib/python2.7/dist-packages/torch/cuda/__init__.py", line 161, in _lazy_init
_check_driver()
File "/usr/local/lib/python2.7/dist-packages/torch/cuda/__init__.py", line 91, in _check_driver
of the CUDA driver.""".format(str(torch._C._cuda_getDriverVersion())))
AssertionError:
The NVIDIA driver on your system is too old (found version 9000).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
Process finished with exit code 1
import torch
torch.__version__
torch.cuda.is_available()
#查看Linux server安装的cuda版本
#切换到/usr/local/cuda/samples/1_Utilities/deviceQuery然后运行
make
./deviceQuery
pip3 uninstall pytorch
pip3 install [pytorch-version-link]