added docs page

This commit is contained in:
William Falcon 2019-06-26 19:33:50 -04:00
parent ccec280094
commit 0f44c5067a
1 changed files with 5 additions and 3 deletions

View File

@ -29,7 +29,10 @@ This is a research tool I built for myself internally while doing my PhD. The AP
Keras is too abstract for researchers. Lightning makes it so you only have to define your model but still control all details of training if you need to. Keras is too abstract for researchers. Lightning makes it so you only have to define your model but still control all details of training if you need to.
To use lightning do 2 things: To use lightning do 2 things:
1. Define a model with this interface 1. Define a model with the lightning interface.
2. Feed this model to the lightning trainer.
*Example model definition*
```python ```python
from pytorch_lightning import RootModule from pytorch_lightning import RootModule
@ -48,8 +51,7 @@ class MyModel(RootModule):
def add_model_specific_args(parent_parser): # add args for this model to your argparse def add_model_specific_args(parent_parser): # add args for this model to your argparse
``` ```
2. Automate the training loop using the trainer *Example trainer*
```python ```python
from pytorch_lightning import Trainer from pytorch_lightning import Trainer
from pytorch_lightning.utils.pt_callbacks import EarlyStopping, ModelCheckpoint from pytorch_lightning.utils.pt_callbacks import EarlyStopping, ModelCheckpoint