Learn R Programming

ggmlR (version 0.6.1)

ggml_callback_early_stopping: Early stopping callback

Description

Stops training when the monitored metric does not improve.

Usage

ggml_callback_early_stopping(
  monitor = "val_loss",
  patience = 5,
  min_delta = 0,
  mode = "auto"
)

Value

List with on_epoch_end function

Arguments

monitor

Metric to monitor: "val_loss", "val_accuracy", "train_loss", "train_accuracy"

patience

Number of epochs with no improvement before stopping

min_delta

Minimum change to qualify as improvement

mode

"min" (lower is better) or "max" (higher is better). "auto" infers from monitor name.

See Also

Other callbacks: ggml_schedule_cosine_decay(), ggml_schedule_reduce_on_plateau(), ggml_schedule_step_decay()