From ccec280094bc5c0c43e50229b6084464bd017f8f Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 26 Jun 2019 19:32:14 -0400 Subject: [PATCH] added docs page --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2cbe4d7f..df489cba 100644 --- a/README.md +++ b/README.md @@ -35,19 +35,17 @@ from pytorch_lightning import RootModule class MyModel(RootModule): - def init(self): - # define model - - def training_step(self, data_batch, batch_nb): - def validation_step(self, data_batch, batch_nb): - def validation_end(self, data_batch, batch_nb): - def get_save_dict(self): - def load_model_specific(self, checkpoint): - def configure_optimizers(self): - def tng_dataloader(self): + def init(self): # define model + def training_step(self, data_batch, batch_nb): # what to do with a training batch + def validation_step(self, data_batch, batch_nb): # what to do with a val/test batch + def validation_end(self, data_batch, batch_nb): # collate all val batch outputs + def get_save_dict(self): # return what to save in a checkpoint + def load_model_specific(self, checkpoint): # use the checkpoint to reset your model state + def configure_optimizers(self): # return a list of optimizers + def tng_dataloader(self): # return a pytorch dataloader for each split def val_dataloader(self): def test_dataloader(self): - def add_model_specific_args(parent_parser): + def add_model_specific_args(parent_parser): # add args for this model to your argparse ``` 2. Automate the training loop using the trainer