early_stopping
EarlyStopping
Early stopping utility class for model training.
Stops the training process when a specified performance metric does not improve for a specified number of consecutive epochs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
patience |
int
|
Number of consecutive epochs with no improvement after which training will be stopped. |
10
|
compare_fn |
callable
|
Function to compare two values of the validation metric to determine if one is better than the other. |
lambda x, y: x < y
|
Source code in uncertaintyplayground/utils/early_stopping.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|