I use TensorBoard to visualize network metrics and graphs.
I create a sess = tf.InteractiveSession() session and create a graph in a Jupyter laptop.
In the graph, I include two summary scalars:
with tf.variable_scope('summary') as scope: loss_summary = tf.summary.scalar('Loss', cross_entropy) train_accuracy_summary = tf.summary.scalar('Train_accuracy', accuracy)
Then create summary_writer = tf.summary.FileWriter(logdir, sess.graph) and run:
_,loss_sum,train_accuracy_sum=sess.run([...],feed_dict=feed_dict)
I write metrics:
summary_writer.add_summary(loss_sum, i) summary_writer.add_summary(train_accuracy_sum, i)
I run the code three times.
Every time I start, I re-import the TF and create a new interactive session.
But in Tensorboard, a separate scalar window is created for each run:

In addition, the graph will be duplicated if I check the data for the last run:

How to prevent duplicate graph and scalar window every time I run?
- I want all data to be displayed on the same scalar graphs (with multiple episodes / plot).
- I want each run to refer to the visualization of one graph.
source share