当前位置: 代码迷 >> 综合 >> linux ubuntu theano RuntimeError: Mixed dnn version. The header is version
  详细解决方案

linux ubuntu theano RuntimeError: Mixed dnn version. The header is version

热度:50   发布时间:2023-12-15 16:55:42.0

使用theano时报错: 

Traceback (most recent call last):File "main.py", line 67, in <module>main_process()File "main.py", line 52, in main_processfrom count.six_actions_test import count_one_clipFile "/home/data/user1/intergration_test/count/six_actions_test.py", line 6, in <module>from count.lrc_method import lrcFile "/home/data/user1/intergration_test/count/lrc_method.py", line 4, in <module>import theanoFile "/home/user1/.local/lib/python3.6/site-packages/theano/__init__.py", line 156, in <module>import theano.gpuarrayFile "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/__init__.py", line 33, in <module>from . import fft, dnn, opt, extra_ops, multinomial, reduction, sort, rng_mrg, ctcFile "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/fft.py", line 14, in <module>from .opt import register_opt, op_lifter, register_opt2File "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/opt.py", line 2812, in <module>from .dnn import (local_abstractconv_cudnn,File "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/dnn.py", line 339, in <module>handle_type = CUDNNDataType('cudnnHandle_t', 'cudnnDestroy')File "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/dnn.py", line 259, in CUDNNDataTypeversion=version(raises=False))File "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/dnn.py", line 319, in versionif not dnn_present():File "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/dnn.py", line 209, in dnn_presentdnn_present.avail, dnn_present.msg = _dnn_check_version()File "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/dnn.py", line 180, in _dnn_check_versionv = version()File "/home/user1/.local/lib/python3.6/site-packages/theano/gpuarray/dnn.py", line 334, in version"while the library is version %s." % v)
RuntimeError: Mixed dnn version. The header is version 7005 while the library is version 7603.

这个大bug困扰我很久了!!!!

 

这个错有时候报(用sudo的时候),。有时候不报(不用sudo),但是这次不用sudo,

只是调用相应的文件,

也报错了。没弄好

估计是环境变量引起,

但是搞了半天

没弄好

 

 

暴力解决办法:

找到上述报错中提到的: /home/user1/.local/lib/python3.6/site-packages/theano/gpuarray 中的 dnn.py,打开

将v = f()
改成
v = (7005, 7005)

7005是你机器上安装的cudnn版本

 

还有别的更好的解决办法吗?

 

https://theano-users.narkive.com/1OHVxGsX/runtimeerror-mixed-dnn-version-the-header-is-version-5105-while-the-library-is-version-5110

https://groups.google.com/forum/#!topic/theano-users/OdP7T6tt3ko

 

https://www.jianshu.com/p/12af936e20ef

 

  相关解决方案