我想学习使用TensorFlow,当然,我甚至无法安装它!
这些是关于我案例的信息:
我已按照以下步骤操作:
C:\> pip3 install --upgrade tensorflow-gpu
import tensorflow
但是我收到以下错误:
Traceback (most recent call last):
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 62, in preload_check
ctypes.WinDLL(build_info.nvcuda_dll_name)
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import tensorflow
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
self_check.preload_check()
File "C:\Users\VES\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 70, in preload_check
% build_info.nvcuda_dll_name)
ImportError: Could not find 'nvcuda.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Typically it is installed in 'C:\Windows\System32'. If it is not present, ensure that you have a CUDA-capable GPU with the correct driver installed.
答案 0 :(得分:2)
要在GPU支持下运行tensorflow,您需要安装NVIDIA显卡并安装CUDA库(请参阅requirements here),遗憾的是您的 Intel(R)HD Graphics 520 不会做。
您可以选择CPU版本(pip3 install --upgrade tensorflow
),这仍然可以开始学习。
更新:另一种解决方案是使用在线服务Google Colab,它允许您从Google的云基础架构借用GPU用于学习目的。