Merge pull request #27838 from aweers:patch-4

PiperOrigin-RevId: 246167601
This commit is contained in:
TensorFlower Gardener 2019-05-01 11:53:47 -07:00
commit 2d473d9f4b

View File

@ -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,