[python environment configuration error] Linux server RunTimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED

note! ! ! When installed pytorch and cuda, better go to the official website of the search command installation, so you can ensure the corresponding version
Insert picture description here
encounter the above error when you run code on the server. First of all, it is clear that the server can be installed with multiple types of cuda. ​​The cuda of the virtual environment can be different from that of the server. Use cat /usr/local/cuda/version.txt to view the cuda of the server, not the virtual environment. Use conda for the virtual environment. List directly to view the version of cudatoolkit cudnn.

If you encounter the above error, it must be a package incompatibility problem. At this time, you need to carefully check the correspondence of the python, tensorflow, pytorch, and cuda versions (search for the corresponding version on the Internet). If there is no problem, then try to reinstall it (this is how I solved it)

After uninstalling torch cuda cudnn, use conda install pytorch torchvision cudatoolkit=9.0 to install
Insert picture description here
and then the problem is solved.

Tip: Check if pytorch and cuda are compatible with
python
import torch
torch.cuda.is_available()

If it is true instructions to install the correct
false, then Baidu search Raiders as this tutorial more detailed

Guess you like

Origin blog.csdn.net/qq_45347185/article/details/107880967