【发布时间】:2017-10-03 05:37:24
【问题描述】:
问题
我注意到我的一个网络运行缓慢,并且 nvidia-smi 报告的 GPU 使用率仅约为 10%。运行分析器后,我看到TruncatedNormal 进程占用了绝大多数运行时间(见图)。什么可能导致这种问题?
代码
权重声明函数(来自 MNIST 教程):
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
实际代码:
# First Layer
with tf.name_scope('input'):
x = tf.placeholder(tf.float32, [None, Nvars])
w1 = weight_variable([Nvars, 8])
b1 = bias_variable([8])
y1 = tf.nn.relu(tf.matmul(x, w1) + b1)
【问题讨论】:
标签: performance optimization tensorflow profiling gpu