【发布时间】:2020-03-13 01:52:48
【问题描述】:
Tensorflow-GPU 存在以下问题。在尝试为深度学习任务设置 gpus(在 Jupyter 中)时,我收到以下错误:
InternalError Traceback (most recent call last)
<ipython-input-3-a08c39e19f9e> in <module>
20 for gpu in gpus:
21 tf.config.experimental.set_memory_growth(gpu, True)
---> 22 logical_gpus = tf.config.experimental.list_logical_devices('GPU')
23 print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
24 except RuntimeError as e:
~\Anaconda3\envs\tens-gpu\lib\site-packages\tensorflow_core\python\framework\config.py in list_logical_devices(device_type)
345 List of LogicalDevice objects
346 """
--> 347 return context.context().list_logical_devices(device_type=device_type)
348
349
~\Anaconda3\envs\tens-gpu\lib\site-packages\tensorflow_core\python\eager\context.py in list_logical_devices(self, device_type)
1150 def list_logical_devices(self, device_type=None):
1151 """Return logical devices."""
-> 1152 self.ensure_initialized()
1153
1154 devices = []
~\Anaconda3\envs\tens-gpu\lib\site-packages\tensorflow_core\python\eager\context.py in ensure_initialized(self)
490 if self._default_is_async == ASYNC:
491 pywrap_tensorflow.TFE_ContextOptionsSetAsync(opts, True)
--> 492 self._context_handle = pywrap_tensorflow.TFE_NewContext(opts)
493 finally:
494 pywrap_tensorflow.TFE_DeleteContextOptions(opts)
InternalError: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version
我的 Cuda 版本是 Cuda 10.0.130,cudnn 是 7.6.4,而我有 Intel UHD Graphics 620 和 NVIDIA GeForce MX150 gpus。驱动程序已更新到“优化”版本,我真的不明白什么不起作用。你能帮我吗,因为我已经尝试了我在网上找到的所有东西? 提前谢谢你
【问题讨论】:
-
您需要为您的 GPU 安装最新的驱动程序。跟随向导here
-
它似乎有效,现在我在运行模型时仍然遇到一些问题(在 Spyder 中我得到“2019???????? 16:59:40.664968: W tensorflow/stream_executor/platform /default/dso_loader.cc:55] 无法加载动态库 'cudart64_100.dll'; dlerror: cudart64_100.dll not found",而在 Jupyter 中它更冗长,但如果它取决于 GPU 部分,则 Idk
标签: python tensorflow intel nvidia