EarlyStopping

class cockpit.quantities.EarlyStopping(track_schedule, verbose=False, epsilon=1e-05)[source]

Quantity class for the evidence-based early-stopping criterion.

This criterion uses local statistics of the gradients to indicate when training should be stopped. If the criterion exceeds zero, training should be stopped.

Note: Proposed in

  • Mahsereci, M., Balles, L., Lassner, C., & Hennig, P., Early stopping without a validation set (2017).

Initialization sets the tracking schedule & creates the output dict.

Parameters
  • track_schedule (callable) – Function that maps the global_step to a boolean, which determines if the quantity should be computed.

  • verbose (bool, optional) – Turns on verbose mode. Defaults to False.

  • epsilon (float) – Stabilization constant. Defaults to 0.0.