Show / Hide Table of Contents

Class EarlyStopping

Stop training when a monitored quantity has stopped improving.

Inheritance
System.Object
Keras
Base
Callback
EarlyStopping
Implements
System.IDisposable
Inherited Members
Base.Parameters
Base.None
Base.Init()
Base.ToPython()
Base.InvokeStaticMethod(Object, String, Dictionary<String, Object>)
Base.InvokeMethod(String, Dictionary<String, Object>)
Base.Item[String]
Keras.Instance
Keras.keras
Keras.keras2onnx
Keras.tfjs
Keras.Dispose()
Keras.ToTuple(Array)
Keras.ToList(Array)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Keras.Callbacks
Assembly: Keras.dll
Syntax
public class EarlyStopping : Callback, IDisposable

Constructors

| Improve this Doc View Source

EarlyStopping(String, Single, Int32, Int32, String, Nullable<Single>, Boolean)

Initializes a new instance of the EarlyStopping class.

Declaration
public EarlyStopping(string monitor = "val_loss", float min_delta = 0F, int patience = 0, int verbose = 0, string mode = "auto", float? baseline = default(float? ), bool restore_best_weights = false)
Parameters
Type Name Description
System.String monitor

quantity to be monitored.

System.Single min_delta

minimum change in the monitored quantity to qualify as an improvement, i.e. an absolute change of less than min_delta, will count as no improvement.

System.Int32 patience

number of epochs with no improvement after which training will be stopped.

System.Int32 verbose

verbosity mode.

System.String mode

one of {auto, min, max}. In min mode, training will stop when the quantity monitored has stopped decreasing; in max mode it will stop when the quantity monitored has stopped increasing; in auto mode, the direction is automatically inferred from the name of the monitored quantity.

System.Nullable<System.Single> baseline

Baseline value for the monitored quantity to reach. Training will stop if the model doesn't show improvement over the baseline.

System.Boolean restore_best_weights

whether to restore model weights from the epoch with the best value of the monitored quantity. If False, the model weights obtained at the last step of training are used.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX