Visualizing Tensorflow Graph and Saving/Loading Models

The graph generated in a session in Tensorflow can be vizualized using a Tensorboard which generates the Graph model defined in the code in a UI. The standard way is to save the graph on disk in a file, and then load the file via the tensorboard command which runs Tensorboard on 6006 port (which looks like g00gle)

with tf.Session() as sess:
    writer = tf.summary.FileWriter("/Users/ashutosh/datasets/tensorboard/", sess.graph)
    print (sess.run(x))
writer.close()

Terminal :

>tensorboard --logdir="/Users/ashutosh/datasets/tensorboard/"

Server Running on Browser: http://localhost:6006/

The code for a sample Tensorboard application is posted here

Written on May 7, 2018
[ ]