I\'d like to monitor eg. the learning rate during training in Keras both in the progress bar and in Tensorboard. I figure there must be a way to specify which variables are
I've come to this question because I wanted to log more variables in the Keras progress bar. This is the way I did it after reading the answers here:
class UpdateMetricsCallback(tf.keras.callbacks.Callback):
def on_batch_end(self, batch, logs):
logs.update({'my_batch_metric' : 0.1, 'my_other_batch_metric': 0.2})
def on_epoch_end(self, epoch, logs):
logs.update({'my_epoch_metric' : 0.1, 'my_other_epoch_metric': 0.2})
model.fit(...,
callbacks=[UpdateMetricsCallback()]
)
I hope it helps others.