2017-09-15 182 views
-1

我遇到嘗試運行TensorFlow程序時出現以下錯誤:導入錯誤:未定義的符號:cudnnConvolutionBiasActivationForward

$ python3 
Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import tensorflow as tf 
Traceback (most recent call last): 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper 
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) 
    File "/usr/lib/python3.5/imp.py", line 242, in load_module 
    return load_dynamic(name, filename, file) 
    File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic 
    return _load(spec) 
ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: cudnnConvolutionBiasActivationForward 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 24, in <module> 
    from tensorflow.python import * 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module> 
    raise ImportError(msg) 
ImportError: Traceback (most recent call last): 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper 
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) 
    File "/usr/lib/python3.5/imp.py", line 242, in load_module 
    return load_dynamic(name, filename, file) 
    File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic 
    return _load(spec) 
ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: cudnnConvolutionBiasActivationForward 

無法加載本地TensorFlow運行。

https://www.tensorflow.org/install/install_sources#common_installation_problems

對於一些常見的原因和解決方案。尋求幫助時,請在錯誤消息上方包含整個堆棧跟蹤 。

系統信息: 的Ubuntu 16.04 Cuda的8.0 cudnn 5.1 tensorflow-GPU版本

+0

這不是一個很好的答案,但它看起來像這個問題已被修復重新安裝或強制安裝在過去:https://github.com/tensorflow/tensorflow/issues/12326 –

回答

1

As mentioned here,力重裝應該做的伎倆或降級到一個較低的tensorflow版本也能發揮作用:

pip3 install tensorflow-gpu --upgrade --force-reinstall 

這個問題的一個可能的原因是如果你安裝了tensorflow-cpu和tensorflow-gpu。

相關問題