Monday, May 17, 2021

Keras Callbacks


Keras Callback is an object that can perform actions at various stages of training. 

It can be used for various things like logging, model saving, early stopping, etc. 


The points at which you can insert a callback are: 

1. Global points : On the begining and end of training/testing/prediction

  • on_(train|test|predict)_begin(self, logs=None)
  • on_(train|test|predict)_end(self, logs=None)

2. Batch level points: 

  • on_(train|test|predict)_batch_begin(self, batch, logs=None)
  • on_(train|test|predict)_batch_end(self, batch, logs=None)

3. Epoch level points:

  • on_epoch_begin(self, epoch, logs=None)
  • on_epoch_end(self, epoch, logs=None)


Apart from this, keras also provides built-in callbacks:

  • ModelCheckpoint
  • TensorBoard
  • EarlyStopping
  • LearningRateScheduler
  • ReduceLROnPlateau
  • RemoteMonitor
  • LambdaCallback
  • TerminateOnNaN
  • CSVLogger
  • ProgbarLogger


No comments:

Post a Comment

rls

To enable row-level security (RLS) in MS SQL Server (2016 and later) , you need to define a security policy that uses a user-defined, inli...