I'm attempting to visualize Google's Inception v3 model using TensorBoard in TensorFlow 0.7.1 and am unable to do so. The TensorBoard Graph tab stalls with the statement
Data : Reading graph.pbtxt
I downloaded an un-Tarred the inception v3 model. The graph protobuffer is in /tmp/imagenet/classify_image_graph_def.pb
.
Here's my code to dump the model:
import os
import os.path
import tensorflow as tf
from tensorflow.python.platform import gfile
INCEPTION_LOG_DIR = '/tmp/inception_v3_log'
if not os.path.exists(INCEPTION_LOG_DIR):
os.makedirs(INCEPTION_LOG_DIR)
with tf.Session() as sess:
model_filename = '/tmp/imagenet/classify_image_graph_def.pb'
with gfile.FastGFile(model_filename, 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
_ = tf.import_graph_def(graph_def, name='')
writer = tf.train.SummaryWriter(INCEPTION_LOG_DIR, graph_def)
writer.close()
This dumps a 91 MB file called events.out.tfevents.1456423256.[hostname]
(same size as the graph protobuffer) so it seems that the graph is in there somewhere.
I ran TensorBoard as follows:
tensorboard --logdir /tmp/inception_v3_log
Which results in the aforementioned hung loading bar on the Graph page.
The Chrome JavaScript console yields this error:
Uncaught TypeError: Cannot read property '0' of undefined
which I assume is related to the fact that the graph is missing.
I've tried this with Chrome 48.0.2564.116 (64-bit) on OS X 10.11.3 both with TensorFlow 0.7.1 for Python 3 built using Bazel and TensorFlow 0.7.1 for Python 2 installed via pip with the exact same results.
I also verified that I can visualize the graph generated with the mnist_with_summaries example, so this is an issue specifically with the Inception model.