tabensemb.model.AbstractNN._early_stopping_eval#
method
- AbstractNN._early_stopping_eval(train_loss: float, val_loss: float) float[source]#
Calculate the loss value (criteria) for early stopping. The validation loss is returned, but note that
0.0 * train_lossis added to the returned value so that NaNs in the training set can be detected byEarlyStopping.- Parameters:
- train_loss
The training loss from
default_loss_fnof the epoch.- val_loss
The validation loss from
default_loss_fnof the epoch.
- Returns:
- float
The early stopping evaluation.