added docs page

This commit is contained in:
William Falcon 2019-06-26 20:00:53 -04:00
parent 8a0bd25d30
commit 08b95ec6a8
1 changed files with 9 additions and 2 deletions

View File

@ -39,12 +39,19 @@ To use lightning do 2 things:
```python
# define what happens for training here
def training_step(self, data_batch, batch_nb):
x, y = data_batch
out = self.forward(x)
loss = my_loss(out, y)
return {'loss': loss}
```
- Automatic validation loop
```python
# define what happens for validation here
def validation_step(self, data_batch, batch_nb):
def validation_step(self, data_batch, batch_nb): x, y = data_batch
out = self.forward(x)
loss = my_loss(out, y)
return {'loss': loss}
```
- Automatic early stopping