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_loss is added to the returned value so that NaNs in the training set can be detected by EarlyStopping.

Parameters:
train_loss

The training loss from default_loss_fn of the epoch.

val_loss

The validation loss from default_loss_fn of the epoch.

Returns:
float

The early stopping evaluation.