self.parameters() access in pytorch lightning #13394
Unanswered
arjunsinghrathore
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment 2 replies
-
I don't think |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have noticed that if i call self.parameters() like this in the init of the pl.LightningModule class, then I'm able to access it :
for param in self.parameters(): print('param : ',param.weight)
but if I call it similarly either in the training step or the optimizer step then self.parameters() does not return any param. Is there something special I need to do to rectify this?
Beta Was this translation helpful? Give feedback.
All reactions