2017-08-18 16 views
1

私は機械学習の初心者で、Anacondaを使用してTensorFlow Python環境をセットアップしようとしています。しかし、私はこれは現在非常に多くの他の質問と同じエラーにもかかわらずTensorFlow 1.3 Windows 7でGPUバージョンが動作しない

>>> import tensorflow as tf 
Traceback (most recent call last): 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow_internal.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in im 
port_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 985, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 968, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked 
    File "<frozen importlib._bootstrap>", line 666, in _load_unlocked 
    File "<frozen importlib._bootstrap>", line 577, in module_from_spec 
    File "<frozen importlib._bootstrap_external>", line 938, in create_module 
    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed 
ImportError: DLL load failed: The specified module could not be found. 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow_internal.py", line 21, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow_internal.py", line 20, in swig_import_helper 
    return importlib.import_module('_pywrap_tensorflow_internal') 
    File "C:\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in im 
port_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
ImportError: No module named '_pywrap_tensorflow_internal' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", 
line 24, in <module> 
    from tensorflow.python import * 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init_ 
_.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow.py", line 52, in <module> 
    raise ImportError(msg) 
ImportError: Traceback (most recent call last): 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow_internal.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in im 
port_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 985, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 968, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked 
    File "<frozen importlib._bootstrap>", line 666, in _load_unlocked 
    File "<frozen importlib._bootstrap>", line 577, in module_from_spec 
    File "<frozen importlib._bootstrap_external>", line 938, in create_module 
    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed 
ImportError: DLL load failed: The specified module could not be found. 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow_internal.py", line 21, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_ 
tensorflow_internal.py", line 20, in swig_import_helper 
    return importlib.import_module('_pywrap_tensorflow_internal') 
    File "C:\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in im 
port_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
ImportError: No module named '_pywrap_tensorflow_internal' 

「『pywrap_tensorflow_internal』という名前のモジュール」の共通の問題を扱ってきたが、解決策のどれも動作するようには思えません。 がインストールされており、%PATH%に指されています。これをPython 3.5で実行しています。私は、この問題がTensorFlowのCPUバージョンを実行するときに発生しないので、CUDA内にある問題は信じています

しかし、私は自分のCUDAセットアップに何が間違っているかを理解することができませんでした。私はCUDA 8とcuDNN v5.1をインストールしました。私は私の設定が間違っているものを絶対にないアイデアを持っていない

​​

ので、任意の助けをいただければ幸いです。Here is what my CUDA install folder looks like. cuDNN is just the files extracted from the cuDNN zip.

はまた、ここに私の私の%PATH%の関連する部分です。

答えて

4

TensorFlow 1.3(昨日リリースされた)のGPUバージョンをインストールした場合、リリースされたPIPパッケージにはcuDNN 6が必要です。 NVIDIA's websiteからインストールできます。ファイルcudnn64_6.dllを含むディレクトリが、あなたの%PATH%環境変数に含まれていることを確認してください。

+0

興味深いことに、テンソルフローのマニュアルではcuDNN 5.1のみを使用していると言われていますが、新しいインストールでcuDNN 6を試してみます。私はこれがうまくいくことを願っています – Lexinyaas

+0

確かに、TF 1.3のマニュアルに間違いがあり、それを修正するために[pull request](https://github.com/tensorflow/tensorflow/pull/12383)があります。 [TF 1.3リリースノート](https://github.com/tensorflow/tensorflow/releases/tag/v1.3.0)には、事前ビルドされたバイナリでcuDNN 6を使用するための変更が記載されています。 – mrry

+0

アップデート:これはうまくいった!助けてくれてありがとう。私はインストールの説明がなぜ動作しないcuDNNのverionsを使用すると言ったのだろうか? – Lexinyaas

関連する問題