Re-enable explicit control of summary tag
See original GitHub issueMigrated from https://github.com/tensorflow/tensorflow/issues/6150
The basic issue is: It used to be possible to precisely control the display name (or tag) of summary data in TensorBoard, because users had direct control over the tag field.
However, this meant that summary code ignored tf name scopes when generating summaries and tags. This was frustrating because it meant the following code was broken:
def layer(input):
W = get_weights_variable(somehow)
b = get_bias_variable(somehow)
activation = tf.nn.relu(input * W + b)
s = tf.summary.histogram("activation_histogram", activation)
return activation
input = tf.placeholder(...)
layer1 = layer(input)
layer2 = layer(layer1)
...
merged = tf.summary.merge_all()
....
This code would be broken because the tag “activation_histogram” would be used twice, creating a conflict.
To fix this, the summary module (which was added in tf1.0) removes explicit control of the tag from the user. Instead, the first argument to the summary is the “name”, and the generated node_name is used as the summary tag. As discussed in the linked issue, however, this creates its own set of frustrations and headaches.
I think a robust solution would be to add a display_name argument to summaries, which is used to create a SummaryMetadata that TensorBoard parses. Then, TensorBoard can use the display_name as the default name in tb, and fall back to the tag in case of conflicts.
I’m not sure how to implement this in a way that generalizes to the plugin system, though. I don’t want to fix it just for individual plugins. We also need to continue to support the case where users manually generate the summary proto with an explicit tag.
@jart @wchargin @chihuahua thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (8 by maintainers)
Top GitHub Comments
Is having this be configurable still the plan? I see the preview TF2.0 summary API does not have this feature.
Also see: “Allow dynamic summary names in new summary interface” https://github.com/tensorflow/tensorflow/issues/6603