Callback

open class Callback

Base class used to build new callbacks.

NOTE: This class contains empty methods, inherit it and override if you need functionality.

Callback methods are called during training, evaluation, prediction phases on each batch, epoch, start and end of the specific phase.

Constructors

Callback
Link copied to clipboard
fun Callback()

Functions

onEpochBegin
Link copied to clipboard
open fun onEpochBegin(epoch: Int, logs: TrainingHistory)

Called at the start of an epoch during training phase.

onEpochEnd
Link copied to clipboard
open fun onEpochEnd(epoch: Int, event: EpochTrainingEvent, logs: TrainingHistory)

Called at the end of an epoch during training phase.

onPredictBatchBegin
Link copied to clipboard
open fun onPredictBatchBegin(batch: Int, batchSize: Int)

Called at the beginning of a batch during prediction phase.

onPredictBatchEnd
Link copied to clipboard
open fun onPredictBatchEnd(batch: Int, batchSize: Int)

Called at the end of a batch during prediction phase.

onPredictBegin
Link copied to clipboard
open fun onPredictBegin()

Called at the beginning of prediction.

onPredictEnd
Link copied to clipboard
open fun onPredictEnd()

Called at the end of prediction.

onTestBatchBegin
Link copied to clipboard
open fun onTestBatchBegin(batch: Int, batchSize: Int, logs: History)

Called at the beginning of a batch during evaluation phase. Also called at the beginning of a validation batch during validation phase, if validation data is provided.

onTestBatchEnd
Link copied to clipboard
open fun onTestBatchEnd(batch: Int, batchSize: Int, event: BatchEvent?, logs: History)

Called at the end of a batch during evaluation phase. Also called at the end of a validation batch during validation phase, if validation data is provided.

onTestBegin
Link copied to clipboard
open fun onTestBegin()

Called at the beginning of evaluation or validation.

onTestEnd
Link copied to clipboard
open fun onTestEnd(logs: History)

Called at the end of evaluation or validation.

onTrainBatchBegin
Link copied to clipboard
open fun onTrainBatchBegin(batch: Int, batchSize: Int, logs: TrainingHistory)

Called at the beginning of a batch during training phase.

onTrainBatchEnd
Link copied to clipboard
open fun onTrainBatchEnd(batch: Int, batchSize: Int, event: BatchTrainingEvent, logs: TrainingHistory)

Called at the end of a batch during training phase.

onTrainBegin
Link copied to clipboard
open fun onTrainBegin()

Called at the beginning of training.

onTrainEnd
Link copied to clipboard
open fun onTrainEnd(logs: TrainingHistory)

Called at the end of training. This method is empty. Extend this class to handle this event.

Inheritors

EarlyStopping
Link copied to clipboard
TerminateOnNaN
Link copied to clipboard
TimeStopping
Link copied to clipboard