Python 张力板激活直方图

Python 张力板激活直方图,python,tensorflow,tensorboard,Python,Tensorflow,Tensorboard,如何在tensorboard中绘制tf.layers.dense激活的直方图?考虑以下情况: with tf.variable_scope('hidden'): hidden_layer = tf.layers.dense(input, 100, activation=tf.nn.relu) 我可以使用以下代码绘制隐藏的的权重和偏差: for v in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='hidden'):

如何在tensorboard中绘制
tf.layers.dense
激活的直方图?考虑以下情况:

with tf.variable_scope('hidden'):
hidden_layer = tf.layers.dense(input, 100, activation=tf.nn.relu)
我可以使用以下代码绘制
隐藏的
的权重和偏差:

for v in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='hidden'):
    tf.summary.histogram("{}/weight_histogram".format(v.name), v)

然而,我似乎也不能得到一个激活的集合。我如何修改它来绘制激活的直方图?

在您的模型范围内,您需要调用以下内容:
tf.contrib.layers.summary\u activation(hidden\u layer)