Best practice way to add hparams AFTER __init__ is called #11107
Unanswered
ssharpe42
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment 1 reply
-
I think you can just manually attach it. def setup(...):
self.hparams['something'] = ... |
Beta Was this translation helpful? Give feedback.
1 reply
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 would like to add hparams which are not args in the init method.
These values come after running
.setup()
function to process data (essentially to get the number of levels of each categorical )When I load the model later on I would also like these values to populate.
Should I have these as optional parameters and update hparams after setup? Or should I be creating a DataModule and pass them in as hparams to the LightningModule?
Beta Was this translation helpful? Give feedback.
All reactions