From b02f4a4ccf075cccf304a8ec918cdd28a7bd7d7d Mon Sep 17 00:00:00 2001 From: William Falcon Date: Tue, 13 Aug 2019 12:10:08 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c70a3be9..c8280854 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,10 @@ Don't worry about training on multiple gpus or speeding up your code, lightning --- ## How do I do use it? +The research code goes into a LightningModule and you train it using a Trainer. Think of the LightningModule as a *system* such as seq-2-seq, GAN, etc... However, the LightningModule can ALSO just be a simple classifier such as the example below. To use lightning do 2 things: -1. [Define a LightningModel](https://williamfalcon.github.io/pytorch-lightning/LightningModule/RequiredTrainerInterface/) +1. [Define a LightningModule](https://williamfalcon.github.io/pytorch-lightning/LightningModule/RequiredTrainerInterface/) ```python import os import torch @@ -71,7 +72,7 @@ import torchvision.transforms as transforms import pytorch_lightning as pl -class CoolModel(pl.LightningModule): +class CoolSystem(pl.LightningModule): def __init__(self): super(CoolModel, self).__init__() @@ -122,7 +123,7 @@ class CoolModel(pl.LightningModule): ```python from pytorch_lightning import Trainer -model = CoolModel() +model = CoolSystem() # most basic trainer, uses good defaults trainer = Trainer() From 1cd5dde16423662048ea0c98c344d8109dae285a Mon Sep 17 00:00:00 2001 From: William Falcon Date: Tue, 13 Aug 2019 12:11:24 -0400 Subject: [PATCH 2/3] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8280854..7c22a146 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,9 @@ Don't worry about training on multiple gpus or speeding up your code, lightning --- ## How do I do use it? -The research code goes into a LightningModule and you train it using a Trainer. Think of the LightningModule as a *system* such as seq-2-seq, GAN, etc... However, the LightningModule can ALSO just be a simple classifier such as the example below. +The research code goes into a [LightningModule]((https://williamfalcon.github.io/pytorch-lightning/LightningModule/RequiredTrainerInterface/)) which you fit using a Trainer. + +Think of the LightningModule as a *system* such as seq-2-seq, GAN, etc... However, the LightningModule can ALSO just be a simple classifier such as the example below. To use lightning do 2 things: 1. [Define a LightningModule](https://williamfalcon.github.io/pytorch-lightning/LightningModule/RequiredTrainerInterface/) From bb75cec0760ffa00e6a4902133571f8b4036e7c4 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Tue, 13 Aug 2019 12:56:12 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c22a146..b7ff2f53 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ import pytorch_lightning as pl class CoolSystem(pl.LightningModule): def __init__(self): - super(CoolModel, self).__init__() + super(CoolSystem, self).__init__() # not the best model... self.l1 = torch.nn.Linear(28 * 28, 10)