Type Callback
Namespace tensorflow.keras.callbacks
Parent PythonObjectContainer
Interfaces ICallback
Abstract base class used to build new callbacks.
Methods
- on_batch_begin
- on_batch_begin_dyn
- on_batch_end
- on_batch_end_dyn
- on_epoch_begin
- on_epoch_begin_dyn
- on_epoch_end
- on_epoch_end_dyn
- on_test_batch_begin_dyn
- on_test_batch_end_dyn
- on_train_batch_begin_dyn
- on_train_batch_end_dyn
- set_model_
- set_model_dyn_
- set_params_
- set_params_dyn_
Properties
Public instance methods
void on_batch_begin(int batch, IDictionary<string, object> logs)
A backwards compatibility alias for `on_train_batch_begin`.
object on_batch_begin_dyn(object batch, object logs)
A backwards compatibility alias for `on_train_batch_begin`.
void on_batch_end(int batch, IDictionary<string, object> logs)
A backwards compatibility alias for `on_train_batch_end`.
object on_batch_end_dyn(object batch, object logs)
A backwards compatibility alias for `on_train_batch_end`.
void on_epoch_begin(int epoch, IDictionary<string, object> logs)
Called at the start of an epoch. Subclasses should override for any actions to run. This function should only
be called during TRAIN mode.
Parameters
-
int
epoch - integer, index of epoch.
-
IDictionary<string, object>
logs - dict. Currently no data is passed to this argument for this method but that may change in the future.
object on_epoch_begin_dyn(object epoch, object logs)
Called at the start of an epoch. Subclasses should override for any actions to run. This function should only
be called during TRAIN mode.
Parameters
-
object
epoch - integer, index of epoch.
-
object
logs - dict. Currently no data is passed to this argument for this method but that may change in the future.
void on_epoch_end(int epoch, IDictionary<string, object> logs)
Called at the end of an epoch. Subclasses should override for any actions to run. This function should only
be called during TRAIN mode.
Parameters
-
int
epoch - integer, index of epoch.
-
IDictionary<string, object>
logs - dict, metric results for this training epoch, and for the validation epoch if validation is performed. Validation result keys are prefixed with `val_`.
object on_epoch_end_dyn(object epoch, object logs)
Called at the end of an epoch. Subclasses should override for any actions to run. This function should only
be called during TRAIN mode.
Parameters
-
object
epoch - integer, index of epoch.
-
object
logs - dict, metric results for this training epoch, and for the validation epoch if validation is performed. Validation result keys are prefixed with `val_`.
object on_test_batch_begin_dyn(object batch, object logs)
Called at the beginning of a batch in `evaluate` methods. Also called at the beginning of a validation batch in the `fit`
methods, if validation data is provided. Subclasses should override for any actions to run.
Parameters
-
object
batch - integer, index of batch within the current epoch.
-
object
logs - dict. Has keys `batch` and `size` representing the current batch number and the size of the batch.
object on_test_batch_end_dyn(object batch, object logs)
Called at the end of a batch in `evaluate` methods. Also called at the end of a validation batch in the `fit`
methods, if validation data is provided. Subclasses should override for any actions to run.
Parameters
-
object
batch - integer, index of batch within the current epoch.
-
object
logs - dict. Metric results for this batch.
object on_train_batch_begin_dyn(object batch, object logs)
Called at the beginning of a training batch in `fit` methods. Subclasses should override for any actions to run.
Parameters
-
object
batch - integer, index of batch within the current epoch.
-
object
logs - dict. Has keys `batch` and `size` representing the current batch number and the size of the batch.
object on_train_batch_end_dyn(object batch, object logs)
Called at the end of a training batch in `fit` methods. Subclasses should override for any actions to run.
Parameters
-
object
batch - integer, index of batch within the current epoch.
-
object
logs - dict. Metric results for this batch.