netket.callbacks.EarlyStopping

class netket.callbacks.EarlyStopping(min_delta=0.0, patience=0, baseline=None, monitor='mean')[source]

Bases: object

A simple callback to stop NetKet if there are no more improvements in the training. based on driver._loss_name.

Attributes
baseline: float = None

Baseline value for the monitored quantity. Training will stop if the driver hits the baseline.

min_delta: float = 0.0

Minimum change in the monitored quantity to qualify as an improvement.

monitor: str = 'mean'

Loss statistic to monitor. Should be one of ‘mean’, ‘variance’, ‘sigma’.

patience: Union[int, float] = 0

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