Commit f1b3f22c authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Monitor the Keras' global batch size.

PiperOrigin-RevId: 324656070
parent eab78118
......@@ -26,6 +26,12 @@ from absl import logging
import tensorflow as tf
from tensorflow.python.eager import monitoring
global_batch_size_gauge = monitoring.IntGauge(
'/tensorflow/training/global_batch_size', 'TF training global batch size')
class BatchTimestamp(object):
"""A structure to store batch time stamp."""
......@@ -60,6 +66,8 @@ class TimeHistory(tf.keras.callbacks.Callback):
self.steps_in_epoch = 0
self.start_time = None
global_batch_size_gauge.get_cell().set(batch_size)
if logdir:
self.summary_writer = tf.summary.create_file_writer(logdir)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment