Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorboard scalar plotting with epoch number on the horizontal axis

I am new to TensorFlow, and I recently started to play around a little bit with data visualization using Tensorboard. I was wondering if it is possible to convert the horizontal axis of the monitoring scalars (I monitor accuracy and loss on train and validation) to show epoch number instead of iteration number. the only way I can think of how to do it is to change the sampling frequency to one per epoch, but I am interested in keeping the original sampling resolution.

is there a better way?

like image 401
Nir Morgulis Avatar asked Sep 02 '17 18:09

Nir Morgulis


1 Answers

Yes, you can do this by passing the epoch number to the global_step parameter of the add_summary() method:

summary_writer = tf.summary.FileWriter(log_dir)

my_summary = session.run(my_summary_op, feed_dict)
summary_writer.add_summary(my_summary, global_step=epoch_number)
like image 189
GeertH Avatar answered Oct 17 '22 14:10

GeertH