Merge pull request #27838 from aweers:patch-4
PiperOrigin-RevId: 246167601
This commit is contained in:
commit
2d473d9f4b
@ -1019,6 +1019,16 @@ class EarlyStopping(Callback):
|
||||
the epoch with the best value of the monitored quantity.
|
||||
If False, the model weights obtained at the last step of
|
||||
training are used.
|
||||
|
||||
Example:
|
||||
|
||||
```python
|
||||
callback = tf.keras.callbacks.EarlyStopping(monitor='val_loss', patience=3)
|
||||
# This callback will stop the training when there is no improvement in
|
||||
# the validation loss for three consecutive epochs.
|
||||
model.fit(data, labels, epochs=100, callbacks=[callback],
|
||||
validation_data=(val_data, val_labels))
|
||||
```
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
|
Loading…
x
Reference in New Issue
Block a user