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?
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With