[英]Tensorboard Histogram of Activations
How can I plot histograms of the activations of tf.layers.dense
in tensorboard? 如何在张量
tf.layers.dense
绘制tf.layers.dense激活的直方图? Consider the following situation: 请考虑以下情况:
with tf.variable_scope('hidden'):
hidden_layer = tf.layers.dense(input, 100, activation=tf.nn.relu)
I can plot the weights and biases from hidden
with the following code: 我可以使用以下代码绘制
hidden
的权重和偏差:
for v in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='hidden'):
tf.summary.histogram("{}/weight_histogram".format(v.name), v)
However, I can't seem to get a collection of the activations as well. 但是,我似乎也无法获得这些激活的集合。 How could I modify this to also plot histograms of the activations?
我如何修改它以绘制激活的直方图?
在模型范围内,您需要调用以下内容: tf.contrib.layers.summarize_activation(hidden_layer)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.