Update README.md

This commit is contained in:
William Falcon 2019-07-27 14:38:33 -04:00 committed by GitHub
parent 66188209b5
commit a48cccdc68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -77,9 +77,7 @@ class CoolModel(ptl.LightningModule):
return {'avg_val_loss': avg_loss}
def configure_optimizers(self):
optim = torch.optim.Adam(self.parameters(), lr=0.02)
self.optimizers = [optim]
return self.optimizers
return [torch.optim.Adam(self.parameters(), lr=0.02)]
@ptl.data_loader
def tng_dataloader(self):