-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Tensorflox-gpu : 1.8.0
Tensorboard : 1.8.0
Python : 3.6.5
Distribution : Ubuntu 16.04.4 LTS
Description of the problem :
When adding a graph to visualize it in tensorboard, the graph does not print.

This problem does not seem to depend on the browser (we tested chrome, firefox and safari). Also the console log of the browser shows this error :
](https://user-images.githubusercontent.com/16269358/42632350-222f19d4-85dd-11e8-81b9-a14f4b2067db.png)
Minimal example of the problem :
Import tensorflow as tf
graph = tf.Graph()
with graph.as_default():
var1 = tf.placeholder(dtype=tf.int32, shape=(None), name="wedontcare")
var2 = tf.placeholder(dtype=tf.float32, shape=(None), name="length")
with tf.Session(graph=graph) as sess:
sess.run(tf.global_variables_initializer())
writer = tf.summary.FileWriter("graph/")
writer.add_graph(sess.graph)
What we tried :
- It seems the problem occurs when the name
name="length"is specified in a placeholder. This example works fine :
Import tensorflow as tf
graph = tf.Graph()
with graph.as_default():
# No palceholder name "length"
var1 = tf.placeholder(dtype=tf.int32, shape=(None), name="wedontcare")
var2 = tf.placeholder(dtype=tf.float32, shape=(None), name="thisworks")
with tf.Session(graph=graph) as sess:
sess.run(tf.global_variables_initializer())
writer = tf.summary.FileWriter("graph/")
writer.add_graph(sess.graph)
- Also it seems we need at least two placeholders to trigger the prolbem. This example works fine :
Import tensorflow as tf
graph = tf.Graph()
with graph.as_default():
# Only one placeholder
var2 = tf.placeholder(dtype=tf.float32, shape=(None), name="length")
with tf.Session(graph=graph) as sess:
sess.run(tf.global_variables_initializer())
writer = tf.summary.FileWriter("graph/")
writer.add_graph(sess.graph)
- Finally it seems we need at least one placeholder stated before the one with
name="length"to trigger the problem. This example works fine :
Import tensorflow as tf
graph = tf.Graph()
with graph.as_default():
# the name "length" placeholder is stated first
var2 = tf.placeholder(dtype=tf.float32, shape=(None), name="length")
var1 = tf.placeholder(dtype=tf.int32, shape=(None), name="wedontcare")
with tf.Session(graph=graph) as sess:
sess.run(tf.global_variables_initializer())
writer = tf.summary.FileWriter("graph/")
writer.add_graph(sess.graph)
Note that you may have weird behaviours when overwritting the graph with newest events, so be sure to clear old events before testing a case and conclude.