我运行的是Windows10,酷睿i7-8700CPU,gtx geforce 1660 ti GPU。训练模型时,gpu利用率非常低(最大为5-10%,有时更低)。即使是is网络也有五层。另一方面,CPU利用率为30%或更高。
发布于 2019-11-21 15:58:42
请检查以下各项:
对于步骤1,为了验证显卡是否可用且已使用,请使用以下几行代码:
import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
tf.debugging.set_log_device_placement(True)
# Create some tensors
a = tf.constant([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])
b = tf.constant([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]])
c = tf.matmul(a, b)
print(c)打印应包含(与结果一起)以下信息:
在device /job:localhost/replica:0/task:0/device:GPU:0中执行操作MatMul的
https://stackoverflow.com/questions/56038801
复制相似问题