class, verbose=False, checkpoint_file='')

Early stops the training if loss doesn’t improve after a given patience.

__init__(patience=10, verbose=False, checkpoint_file='')
  • patience – How long to wait after last time loss improved. Default: 10

  • verbose – If True, prints a message for each loss improvement. Default: False


__init__([patience, verbose, checkpoint_file])

type patience:

save_checkpoint(loss, model)

Saves model when loss decrease.