Я пытаюсь использовать TensorFlow
на GPU (не на CPU), но у меня проблема.
Мой GPU: GeForce GTX 1050
ОС: Windows
Я следовал инструкциям: https://www.tensorflow.org/install/install_windows и использовал установку в pip
Все прошло успешно до того момента, как я пытался написать: import tensorflow as tf
ЗДЕСЬ ЖУРНАЛ:
C:\Users\deanm\venv\Scripts>pip3 install --upgrade tensorflow-gpu
Collecting tensorflow-gpu
Using cached https://files.pythonhosted.org/packages/75/60/73137e9ab419be892f08e576e771d90344697973c4a584aa0ca90e96b0e2/tensorflow_gpu-1.10.0-cp35-cp35m-win_amd64.whl
Requirement not upgraded as not directly required: absl-py>=0.1.6 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (0.4.1)
Requirement not upgraded as not directly required: six>=1.10.0 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (1.11.0)
Requirement not upgraded as not directly required: protobuf>=3.6.0 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (3.6.1)
Collecting tensorboard<1.11.0,>=1.10.0 (from tensorflow-gpu)
Using cached https://files.pythonhosted.org/packages/c6/17/ecd918a004f297955c30b4fffbea100b1606c225dbf0443264012773c3ff/tensorboard-1.10.0-py3-none-any.whl
Requirement not upgraded as not directly required: termcolor>=1.1.0 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (1.1.0)
Requirement not upgraded as not directly required: gast>=0.2.0 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (0.2.0)
Requirement not upgraded as not directly required: wheel>=0.26 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (0.31.1)
Requirement not upgraded as not directly required: grpcio>=1.8.6 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (1.14.2)
Requirement not upgraded as not directly required: numpy<=1.14.5,>=1.13.3 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (1.14.5)
Requirement not upgraded as not directly required: setuptools<=39.1.0 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (39.1.0)
Requirement not upgraded as not directly required: astor>=0.6.0 in c:\users\deanm\venv\lib\site-packages (from tensorflow-gpu) (0.7.1)
Requirement not upgraded as not directly required: werkzeug>=0.11.10 in c:\users\deanm\venv\lib\site-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu) (0.14.1)
Requirement not upgraded as not directly required: markdown>=2.6.8 in c:\users\deanm\venv\lib\site-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu) (2.6.11)
Installing collected packages: tensorboard, tensorflow-gpu
Successfully installed tensorboard-1.10.0 tensorflow-gpu-1.10.0
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\deanm\venv\Scripts>Python
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\deanm\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\deanm\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\deanm\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Может кто-нибудь придумать какое-нибудь решение? Я совершенно новичок в этом деле, поэтому я беспомощен