Commit 52372782 authored by Nimit Nigania's avatar Nimit Nigania
Browse files

add option to print loss

parent ad41c647
...@@ -83,6 +83,9 @@ class TimeHistory(tf.keras.callbacks.Callback): ...@@ -83,6 +83,9 @@ class TimeHistory(tf.keras.callbacks.Callback):
"BenchmarkMetric: {'global step':%d, 'time_taken': %f," "BenchmarkMetric: {'global step':%d, 'time_taken': %f,"
"'examples_per_second': %f}" % "'examples_per_second': %f}" %
(self.global_steps, elapsed_time, examples_per_second)) (self.global_steps, elapsed_time, examples_per_second))
tf.compat.v1.logging.info(
"Loss: %f" %
(logs.get('loss')))
self.start_time = timestamp self.start_time = timestamp
def on_epoch_end(self, epoch, logs=None): def on_epoch_end(self, epoch, logs=None):
......
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