tensorflow / tensorboard

TensorFlow's Visualization Toolkit
Apache License 2.0
6.7k stars 1.66k forks source link

tensorboard search and hide ops #1253

Open chengmengli06 opened 6 years ago

chengmengli06 commented 6 years ago

Tensorboard visualization is great, but for big graphs, it is hard to locate certain ops. There are two many components in the graph. So I want two new functions:

It is possible to hide some nodes, such as reshape, relu, and soon, which does not affects the graph structure. Is it possible to search some ops by name keywords, such as RPNLoss? The search result could be displayed on a search board.

nfelt commented 6 years ago

1) Nodes can be removed from the main graph individually by clicking on them and then clicking to remove them. Are you asking for something like a checkbox to remove all such nodes? An example of a rendered graph and then what you'd like to see would help us understand the feature request.

2) Graph node search was added in our 1.9 release, there is now a box where you can search node names by regex (PR #1130) and then clicking on the results will navigate to that node. Want to give that a try?

cipollone commented 4 years ago

I think the ability to hide certain ops could be really useful. I'm working on TF 2.1.0 stable. I traced a custom keras layer as:

@tf.function
def tracing_model_ops(inputs):
    return self.model(inputs)          # custom keras layer called frame_autoencoder

# Now trace
tf.summary.trace_on(graph=True)
tracing_model_ops(inputs)    # inputs is a batch of zeros
with self.summary_writer.as_default():
    tf.summary.trace_export(self.model.name, step=0)

which produced: Screenshot from 2020-03-16 16-56-31

Both _Arg and ReadVariableOp are not interesting. If their presence in the graph is justified, I'd like to hide them.

(I opened the issue #3118 , which seemed related to this)