【发布时间】:2022-12-26 01:32:02
【问题描述】:
我正在运行以下版本:
windows 10
cuda 11.6
cudnn 8.4
python 3.8.10
这些版本在我运行 torch 模型时有效(我可以在 GPU 上运行 torch 模型!)。
我正在尝试安装和运行tensorflow 模型。
当我安装 tensorflow 2.4.0 或 2.4.1 时,未通过以下方式检测到 GPU:
import tensorflow
physical_devices = tensorflow.config.list_physical_devices('GPU')
未检测到 GPU(physical_devices 为空)
当我升级tensorflow版本到2.8时,检测到GPU(physical_devices不为空)
在构建和拟合我的 tensorflow (tensorflow.keras) 模型之前,我运行了以下命令:
import tensorflow
physical_devices = tensorflow.config.list_physical_devices('GPU')
tensorflow.config.experimental.set_memoty_growth(physical-devices[0], enable=True)
但我收到错误:
Failed to find the dnn implementation
- 我无法更改
CUDA & CUDNN版本,因为它们适用于我的torch模型(使用 GPU 并且在那里工作正常)。
我需要做什么才能在我的机器上使用带有 GPU 的tensorflow?
【问题讨论】:
标签: tensorflow keras tf.keras