Change:
set(CUDNN_ROOT_DIR "" CACHE PATH "Folder contains NVIDIA cuDNN") <del> find_path(CUDNN_INCLUDE_DIR cudnn.h </del> <ins> if($ENV{CUDNN_INCLUDE_DIR}) SET(CUDNN_INCLUDE_DIR $ENV{CUDNN_INCLUDE_DIR}) else($ENV{CUDNN_INCLUDE_DIR}) find_path(CUDNN_INCLUDE_DIR cudnn.h </ins> HINTS ${CUDNN_ROOT_DIR} ${CUDA_TOOLKIT_ROOT_DIR} PATH_SUFFIXES cuda/include include) <ins> endif($ENV{CUDNN_INCLUDE_DIR}) </ins> <del> find_library(CUDNN_LIBRARY cudnn </del> <ins> if($ENV{CUDNN_LIBRARY}) SET(CUDNN_LIBRARY $ENV{CUDNN_LIBRARY}) else($ENV{CUDNN_LIBRARY}) find_library(CUDNN_LIBRARY cudnn </ins> HINTS ${CUDNN_LIB_DIR} ${CUDNN_ROOT_DIR} ${CUDA_TOOLKIT_ROOT_DIR} PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64) <ins> endif($ENV{CUDNN_LIBRARY}) </ins> find_package_handle_standard_args( CUDNN DEFAULT_MSG CUDNN_INCLUDE_DIR CUDNN_LIBRARY)

Discussion:
Traceback (most recent call last): File "", line 3, in <moduleimport model File "/home/abc/github/chinese-", line 5, in <modulefrom import crnnOcr File "/home/abc/github/chinese-", line 72, in <modulemodel,converter = crnnSource() File "/home/abc/github/chinese-", line 64, in crnnSource model = crnn.CRNN(32, 1, len(alphabet)+1, 256, 1).cuda() File "/usr/local/lib/python2.7/dist-", line 216, in cuda return (lambda t: t.cuda(device)) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 123, in apply self.flattenparameters() File "/usr/local/lib/python2.7/dist-", line 65, in flattenparameters if not or not (anyparam): File "/usr/local/lib/python2.7/dist-", line 82, in isacceptable if libcudnn() is None: File "/usr/local/lib/python2.7/dist-", line 58, in libcudnn 'but linked against {}'.format(compileversion, _cudnnversion)) RuntimeError: cuDNN version mismatch: PyTorch was compiled against 6021 but linked against 5110 How to solve the problem?
could you pull the latest master branch and recompile. I pushed a change yesterday that fixes this:
I remove the old code and pull new code, then compile, install.It still fails. /usr/local/lib/python2.7/dist- UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually.

('No training configuration found in save file: ' Traceback (most recent call last): File "", line 3, in <moduleimport model File "/home/qianbb/github/chinese-", line 5, in <modulefrom import crnnOcr File "/home/qianbb/github/chinese-", line 72, in <modulemodel,converter = crnnSource() File "/home/qianbb/github/chinese-", line 64, in crnnSource model = crnn.CRNN(32, 1, len(alphabet)+1, 256, 1).cuda() File "/usr/local/lib/python2.7/dist-", line 216, in cuda return (lambda t: t.cuda(device)) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 100, in apply self.flattenparameters() File "/usr/local/lib/python2.7/dist-", line 66, in flattenparameters if not or not (anyparam): File "/usr/local/lib/python2.7/dist-", line 87, in isacceptable if libcudnn() is None: File "/usr/local/lib/python2.7/dist-", line 58, in libcudnn 'but linked against {}'.format(compileversion, _cudnnversion)) RuntimeError: cuDNN version mismatch: PyTorch was compiled against 6021 but linked against 5110 The library of cuda is shown as following screenshot. !
I found the issue, I fixed it in which we will merge shortly.
ThanksDoes it have been merged?
yes. it is merged.
It seems the fix doesn't work.

The log is shown as following Traceback (most recent call last): File "", line 3, in <moduleimport model File "/home/qianbb/github/chinese-", line 5, in <modulefrom import crnnOcr File "/home/qianbb/github/chinese-", line 72, in <modulemodel,converter = crnnSource() File "/home/qianbb/github/chinese-", line 64, in crnnSource model = crnn.CRNN(32, 1, len(alphabet)+1, 256, 1).cuda() File "/usr/local/lib/python2.7/dist-", line 222, in cuda return (lambda t: t.cuda(device)) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 146, in apply (fn) File "/usr/local/lib/python2.7/dist-", line 100, in apply self.flattenparameters() File "/usr/local/lib/python2.7/dist-", line 66, in flattenparameters if not or not (anyparam): File "/usr/local/lib/python2.7/dist-", line 87, in isacceptable if libcudnn() is None: File "/usr/local/lib/python2.7/dist-", line 58, in libcudnn 'but linked against {}'.format(compileversion, _cudnnversion)) RuntimeError: cuDNN version mismatch: PyTorch was compiled against 6021 but linked against 5110
that is weird. Can I see the full log of in pytorch directory. Can you make sure you have latest commits with .
I am sure the code is up-to-date. First I uninstall the code using the command pip unisntall torch. Then I remove the old code using the command rm -r pytorch and git clone again. The log of install is
Sorry to trouble you. Is there any new information on this issue?
I spent some time resolving this issue and I don't see too much about it online. Try ensuring that your Pytorch build is correct for your specific versions of Cuda and Cudnn. While I had the correct version of Pytorch, I resolved the issue by installing a different build of the same version.

The build I installed is . Here are the list of versions and builds: You can download these files locally and install with conda: (assumes command is being run in a directory containing , where this file will be specific to your Cuda and Cudnn version.
feedback from this code PackagesNotFoundError
thank you - I have edited my comment to reflect that I installed from a local zip.