Fix docs for early stopping (#865)

* updated docs

* updated docs

* upd
This commit is contained in:
Vadim Bereznyuk 2020-02-18 19:25:39 +03:00 committed by GitHub
parent 054a35312d
commit dfbb50cd6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 11 deletions

View File

@ -1,16 +1,22 @@
Early stopping
==================
==============
Default behavior
----------------
By default early stopping will be enabled if `'val_loss'`
is found in `validation_end()` return dict. Otherwise
training will proceed with early stopping disabled.
Enable Early Stopping
----------------------
---------------------
There are two ways to enable early stopping.
.. note:: See: :ref:`trainer`
.. code-block:: python
# A) Looks for val_loss in validation_step return dict
# A) Set early_stop_callback to True. Will look for 'val_loss'
# in validation_end() return dict. If it is not found an error is raised.
trainer = Trainer(early_stop_callback=True)
# B) Or configure your own callback
@ -23,13 +29,10 @@ There are two ways to enable early stopping.
)
trainer = Trainer(early_stop_callback=early_stop_callback)
Force disable early stop
-------------------------------------
To disable early stopping pass None to the early_stop_callback
Disable Early Stopping
----------------------
To disable early stopping pass ``False`` to the `early_stop_callback`.
Note that ``None`` will not disable early stopping but will lead to the
default behaviour.
.. note:: See: :ref:`trainer`
.. code-block:: python
# DEFAULT
trainer = Trainer(early_stop_callback=None)