tensorboard: Graph visualization failed: GraphDefs failed to reconcile.
In TensorFlow v2, below code can cause GraphDef reconciliation error.
@tf.function
def foo(x):
return x ** 2
with writer.as_default():
tf.summary.trace_on()
foo(1)
foo(2)
tf.summary.trace_export("foo")
Depending on the argument, tf.function (really, auto-graph) creates ops that are unique within GraphDef but is not globally unique. In the example above, two GraphDefs (on from foo(1) and another from foo(2)) will be written out and they can collide badly in names and content.
In such case, instead of showing wrong graph content, TensorBoard throws an error.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 2
- Comments: 19 (1 by maintainers)
I was facing this issue as well. Found out that switching the verbose-type from 2 to 1 in the model.fit()-function solved the problem. This might help somebody here, too. Since I’m unsure if this behaviour is intended, I created a issue for it (see here: https://github.com/tensorflow/tensorboard/issues/5745).
any update about this issue? It has been more than one year since the issue was put forward 😢
I would suggest exporting them as different traces with different names. That seems to work for me.
Instead of this:
Do this: