tensorflow2.x 报错 Could not load dynamic library cudnn64_7.dll

前往官网下载所需得 cuddn 补丁:戳我

之后将

tensorflow2.x 报错 Could not load dynamic library cudnn64_7.dll_第1张图片

文件全部复制到相应得
tensorflow2.x 报错 Could not load dynamic library cudnn64_7.dll_第2张图片

中,即可。

测试获取 gpu:

import tensorflow as tf
tf.debugging.set_log_device_placement(True)
gpus = tf.config.experimental.list_physical_devices('GPU')
for gpu in gpus:
    tf.config.experimental.set_memory_growth(gpu, True)
print(gpus)
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
print(logical_gpus)

原文链接:https://learnku.com/articles/41385

你可能感兴趣的:(python,工具使用,tensorflow,cudnn)