From dfbb50cd6a748110627b1f974094c1697580e674 Mon Sep 17 00:00:00 2001 From: Vadim Bereznyuk Date: Tue, 18 Feb 2020 19:25:39 +0300 Subject: [PATCH] Fix docs for early stopping (#865) * updated docs * updated docs * upd --- docs/source/early_stopping.rst | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/source/early_stopping.rst b/docs/source/early_stopping.rst index a7eb222619..f0d6de01d9 100644 --- a/docs/source/early_stopping.rst +++ b/docs/source/early_stopping.rst @@ -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) \ No newline at end of file