qq_44842767 2022-05-13 12:16 采纳率: 66.7%
浏览 26
已结题

TensorFlow、cuda、cudnn的版本到底该怎么选择

首先我的电脑显卡是1650ti,适合的cuda版本应该是11.3,安装的cudnn版本是8.2.1。现在想要运行一段代码,需要的环境是tensorflow-gpu==1.13.1,keras==2.1.5。使用anaconda配置了相应的环境

img

python的版本是3.6.13

img


import tensorflow之后报错

Traceback (most recent call last):
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "E:\anaconda3\envs\vgg\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "E:\anaconda3\envs\vgg\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "E:\anaconda3\envs\vgg\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "E:\anaconda3\envs\vgg\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

CSDN了一下,一个原因是缺少库MSVCP140.dll

img


经检查并不是
还有可能是缺少用于Visual Studio 2015的Visual C ++可再发行组件而引起的

img


经检查也不是
还有一个原因是TensorFlow和cuda的版本不匹配
搜索了一下TensorFlow_gpu1.13.1对应的cuda版本好像是10.1,但是cuda10.1和我的显卡不匹配,所以这个问题应该怎么解决呢

  • 写回答

2条回答

      报告相同问题?

      相关推荐 更多相似问题

      问题事件

      • 系统已结题 5月26日
      • 已采纳回答 5月18日
      • 创建了问题 5月13日

      悬赏问题

      • ¥15 在线教育培训平台,主要以点播视频和在线练习测试为主,除将视频做切片外,有其他哪种方式降低流量?(关键词-带宽速率)
      • ¥20 用c语音或c++实现银行叫号系统
      • ¥15 人工智能 规则正向演绎和推理
      • ¥20 基于STM32F401的电子密码锁设计
      • ¥15 famamacbeth回归中遇到only size-1 arrays can be converted to Python scalars,求解答
      • ¥15 单片机多个自锁按键的编程实践
      • ¥15 用python操作redis存储中文后,再取出的数据变成了乱码怎么办?
      • ¥15 C语言简单排序问题有偿求解
      • ¥20 请问图片的代码什么意思
      • ¥15 coq问题求带,有偿