Abstract base class used to build new callbacks.
params: dict. Training parameters (eg. verbosity, batch size, number of epochs...).
model: instance of
keras.models.Model. Reference of the model being trained.
logs dictionary that callback methods take as argument will contain keys for quantities relevant to the current batch or epoch.
.fit() method of the
Sequential model class will include the following quantities in the
logs that it passes to its callbacks:
on_epoch_end: logs include
loss, and optionally include
val_loss(if validation is enabled in
val_acc(if validation and accuracy monitoring are enabled).
on_batch_begin: logs include
size, the number of samples in the current batch.
on_batch_end: logs include
loss, and optionally
acc(if accuracy monitoring is enabled).
Initialize self. See help(type(self)) for accurate signature.
on_batch_begin( batch, logs=None )
on_batch_end( batch, logs=None )
on_epoch_begin( epoch, logs=None )
on_epoch_end( epoch, logs=None )
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.