【问题标题】:Tensorboard Histogram of Activations激活的张量板直方图
【发布时间】:2018-02-13 19:50:23
【问题描述】:

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

with tf.variable_scope('hidden'):
hidden_layer = tf.layers.dense(input, 100, activation=tf.nn.relu)

我可以使用以下代码从hidden 绘制权重和偏差:

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

但是,我似乎也无法获得激活的集合。我该如何修改它以绘制激活的直方图?

【问题讨论】:

    标签: python tensorflow tensorboard


    【解决方案1】:

    在您的模型范围内,您需要调用以下代码:tf.contrib.layers.summarize_activation(hidden_layer)

    【讨论】:

      猜你喜欢
      • 2018-07-10
      • 2016-07-25
      • 2017-09-01
      • 2020-12-10
      • 2019-03-19
      • 2018-10-12
      • 1970-01-01
      • 1970-01-01
      • 2019-01-10
      相关资源
      最近更新 更多