Fixes the issue https://github.com/tensorflow/tensorflow/issues/44686
PiperOrigin-RevId: 341310003 Change-Id: I524fca2535e9ffbd6a177a3c33d8bf1eeb6f6290
This commit is contained in:
parent
e5d3ef9fd0
commit
0126b15fb9
@ -1700,7 +1700,7 @@ class EarlyStopping(Callback):
|
||||
|
||||
>>> callback = tf.keras.callbacks.EarlyStopping(monitor='loss', patience=3)
|
||||
>>> # This callback will stop the training when there is no improvement in
|
||||
>>> # the validation loss for three consecutive epochs.
|
||||
>>> # the loss for three consecutive epochs.
|
||||
>>> model = tf.keras.models.Sequential([tf.keras.layers.Dense(10)])
|
||||
>>> model.compile(tf.keras.optimizers.SGD(), loss='mse')
|
||||
>>> history = model.fit(np.arange(100).reshape(5, 20), np.zeros(5),
|
||||
|
Loading…
Reference in New Issue
Block a user