Spaces:
Running on Zero
Running on Zero
File size: 300 Bytes
28bf80d dbd1ab1 28bf80d dbd1ab1 28bf80d dbd1ab1 28bf80d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import pytorch_lightning as pl
import torch
class BaseLightningModule(pl.LightningModule):
"""
Minimal LightningModule base for the demo.
"""
def configure_optimizers(self):
lr = getattr(self.hparams, "lr", 1e-3)
return torch.optim.Adam(self.parameters(), lr=lr)
|