added lightning model docs
This commit is contained in:
parent
e2bcf1ecff
commit
c0c2e644fd
|
@ -1,7 +1,7 @@
|
||||||
# PYTORCH-LIGHTNING DOCUMENTATION
|
# PYTORCH-LIGHTNING DOCUMENTATION
|
||||||
|
|
||||||
###### Quick start
|
###### Quick start
|
||||||
- Define a lightning model
|
- [Define a LightningModule](Pytorch-Lightning/LightningModule/)
|
||||||
- Set up the trainer
|
- Set up the trainer
|
||||||
|
|
||||||
###### Quick start examples
|
###### Quick start examples
|
||||||
|
|
|
@ -71,9 +71,6 @@ class ExampleModel(RootModule):
|
||||||
# calculate loss
|
# calculate loss
|
||||||
loss_val = self.loss(y, y_hat)
|
loss_val = self.loss(y, y_hat)
|
||||||
|
|
||||||
# tqdm_dic = {'tng_loss': loss_val.item()}
|
|
||||||
# return loss_val, tqdm_dic
|
|
||||||
|
|
||||||
output = OrderedDict({
|
output = OrderedDict({
|
||||||
'loss': loss_val,
|
'loss': loss_val,
|
||||||
'tqdm_metrics': {}
|
'tqdm_metrics': {}
|
||||||
|
@ -96,7 +93,6 @@ class ExampleModel(RootModule):
|
||||||
labels_hat = torch.argmax(y_hat, dim=1)
|
labels_hat = torch.argmax(y_hat, dim=1)
|
||||||
val_acc = torch.sum(y == labels_hat).item() / (len(y) * 1.0)
|
val_acc = torch.sum(y == labels_hat).item() / (len(y) * 1.0)
|
||||||
|
|
||||||
# output = {'y_hat': y_hat, 'val_loss': loss_val.item(), 'val_acc': val_acc}
|
|
||||||
output = OrderedDict({
|
output = OrderedDict({
|
||||||
'val_loss': loss_val,
|
'val_loss': loss_val,
|
||||||
'val_acc': torch.tensor(val_acc),
|
'val_acc': torch.tensor(val_acc),
|
||||||
|
|
|
@ -3,7 +3,7 @@ theme: readthedocs
|
||||||
docs_dir: docs
|
docs_dir: docs
|
||||||
repo_url: https://github.com/williamFalcon/pytorch-lightning
|
repo_url: https://github.com/williamFalcon/pytorch-lightning
|
||||||
site_dir: 'site'
|
site_dir: 'site'
|
||||||
site_description: 'Documentation for Pytorch Lightning, the researcher version of keras.'
|
site_description: 'Documentation for Pytorch Pytorch-Lightning, the researcher version of keras.'
|
||||||
|
|
||||||
dev_addr: '0.0.0.0:8000'
|
dev_addr: '0.0.0.0:8000'
|
||||||
#google_analytics: ['UA-aasd', 'sitename']
|
#google_analytics: ['UA-aasd', 'sitename']
|
||||||
|
|
Loading…
Reference in New Issue