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 logged, but there's no immediate clarification on this issue on the Keras website.
I guess it's got something to do with creating a custom Callback function, however, it should be possible to modify the already existing progress bar callback, no?
Another way (in fact encouraged one) of how to pass custom values to TensorBoard is by sublcassing the
keras.callbacks.TensorBoard
class. This allows you to apply custom functions to obtain desired metrics and pass them directly to TensorBoard.Here is an example for learning rate of
Adam
optimizer:It can be achieved via a custom metric. Take the learning rate as an example:
The LR will be printed in the progress bar:
Then, you can visualize the LR curve in TensorBoard.