【发布时间】:2021-10-16 10:08:58
【问题描述】:
我已安装 tensorflow-gpu 以在 GPU 上训练我的模型,并已从下方确认安装。
import tensorflow as tf
tf.config.list_physical_devices()
#[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU'),
# PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
我开始训练一个图像分类模型,我希望它在 GPU 上自动运行,除非指定在设备上手动运行。但是在训练模型时,我可以在任务管理器中看到有 2 个 GPU,Intel Graphics card 是 GPU 0,NVIDIA GeForce GTX1660Ti 是 GPU1。这是否意味着 tensorflow 没有检测到我的 NVIDIA 卡,或者它是检测到的实际 GPU?
在训练模型时,我可以看到我的 NVIDIA GPU 利用率非常低。不确定我的模型是在哪个设备上训练的。
有人可以澄清一下吗?
更多版本细节。 tf.__version__ (2.6.0)、python 3.7、CUDA 11.4、cudnn 8.2
【问题讨论】:
标签: python-3.x tensorflow gpu tensorflow2.0