Skip to content

Commit

Permalink
Add FSDP support to MNISTLitModule (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead authored Sep 25, 2023
1 parent 1fb5405 commit bddbc24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/mnist_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def configure_optimizers(self) -> Dict[str, Any]:
:return: A dict containing the configured optimizers and learning-rate schedulers to be used for training.
"""
optimizer = self.hparams.optimizer(params=self.parameters())
optimizer = self.hparams.optimizer(params=self.trainer.model.parameters())
if self.hparams.scheduler is not None:
scheduler = self.hparams.scheduler(optimizer=optimizer)
return {
Expand Down

0 comments on commit bddbc24

Please sign in to comment.