Add EarlyStop documentation (#245)

* Update Training Loop.md

* Update index.md

* Update README.md

* Update Training Loop.md

* Update Training Loop.md
This commit is contained in:
Cola
2019-09-25 14:52:40 -04:00
committed by William Falcon
parent eb268c4184
commit 3d16a686b3
3 changed files with 20 additions and 0 deletions
+18
View File
@@ -19,6 +19,24 @@ It can be useful to force training for a minimum number of epochs or limit to a
trainer = Trainer(min_nb_epochs=1, max_nb_epochs=1000)
```
---
#### Early stopping
To enable ealry-stopping, define the callback and give it to the trainer.
``` {.python}
from pytorch_lightning.callbacks import EarlyStopping
# DEFAULTS
early_stop_callback = EarlyStopping(
monitor='val_loss',
min_delta=0.00,
patience=0,
verbose=False,
mode='auto'
)
trainer = Trainer(early_stop_callback=early_stop_callback)
```
---
#### Force disable early stop
Use this to turn off early stopping and run training to the [max_epoch](#force-training-for-min-or-max-epochs)