This article give you how you can write your tensorflow program and enable tensorboard together with it to analyze tensor graph and other components i.e. scalers, images, audio etc..
How to facilitate it:
- Define your tensorflow placeholder, variables, etc
- Defined session and Run session first
- Note: See following example on how to do it.
- Define the tensorboard summary fileWriter and graph in specificd dir as below:
- writer = tf.summary.FileWriter(“/tmp/test-tf”, sess.graph)
- tf.train.write_graph(sess.graph_def, ‘/tmp/test-tf’, ‘graph.pbtxt’)
- Start tensorboard as below:
$ tensorboard –logdir /tmp/test-tf/
- Check your folder for events and graph logs:
- $ ll /tmp/test-tf/
- -rw-rw-r– 1 ubuntu ubuntu 23565 Dec 11 19:45 events.out.tfevents.1481485540.ip-10-236-190-133
- -rw-rw-r– 1 ubuntu ubuntu 24354 Dec 11 19:45 graph.pbtxt
Follow is an example of jupyter notebook:
Here is an screenshot of tensorboard and graph: