Change:
CUDNN_LIB_DIR = path break else: <del> libraries = sorted(glob.glob(os.path.join(path, 'libcudnn*'))) </del> <ins> libraries = sorted(glob.glob(os.path.join(path, 'libcudnn*' + str(CUDNN_INCLUDE_VERSION) + "*"))) </ins> if libraries: CUDNN_LIBRARY = libraries[0] CUDNN_LIB_DIR = path break <del> for path in include_paths: if path is None or not os.path.exists(path): continue if os.path.exists((os.path.join(path, 'cudnn.h'))): CUDNN_INCLUDE_DIR = path break </del> # Specifying the library directly will overwrite the lib directory library = os.getenv('CUDNN_LIBRARY') if library is not None and os.path.exists(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.