[tensorflow] display of graph in tensorboard

============ Recently found an issue ==================
If it keeps appearing No dashboards are active for the current data set.
Please Checking the path, I found that if there is a Chinese path , it must not be displayed

===============Separation line================
Tensorboard has always played an important role in Tensorflow debugging. The online tensorboard is too cumbersome and must be combined with their training routines. Looking at the API manual is too jerky. After a few days of pondering, there should be no problem with graph drawing in tensorboard.

I wrote a well-understood example as follows:

import tensorflow as tf

sess = tf.InteractiveSession()
a = tf.Variable(0, name="a")
b = tf.Variable(1, name="b")
c = tf.add(a,b)

sess.run(tf.global_variables_initializer())
summary_writer = tf.summary.FileWriter("log", sess.graph)

Then several files will be generated and saved in the log folder and
run on the terminal:

tensorboard --logdir="log"

You can see the graph drawn
write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325724328&siteId=291194637