Simple early stopping on a monitored scalar, typically the training loss.
callback_early_stopping(
patience = 10L,
min_delta = 0,
mode = c("min", "max"),
verbose = FALSE
)A function of the form `function(epoch, current)` that returns TRUE if training should stop, FALSE otherwise.
Integer. Number of epochs with no improvement before stopping.
Minimum change to qualify as an improvement (default: 0).
Character. "min" (for losses) or "max" (for metrics to maximize).
Logical. Whether to print a message when early stopping is triggered.