hparams
raises AttributeError: can't set attribute
#7525
ajinkyaambatwar
started this conversation in
General
Replies: 3 comments 13 replies
-
You can do also do in one line: |
Beta Was this translation helpful? Give feedback.
12 replies
-
for me the |
Beta Was this translation helpful? Give feedback.
1 reply
-
@ajinkyaambatwar can you please specify in which file can I find the line "self.hparams = hparams"? I am also getting the same error while running BYOL on jupyter notebook. |
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am trying to create a pytorch lightning module. I have config folder from which I am creating a hyperparameters dictionary using hydra. When I attempt to set this dictionary to
self.hparams
, it returns an attribute errorAttributeError: can't set attribute
I am following the structure from the official pytorch-lightning docs. But I am not sure, why is this error coming.
Here's my pytorch Lightning module definition
In my
main()
This function converts all yaml files in the config folder into a single hparams dictionary.
Returns
AssertionError message at the bottom is empty.
I am not sure what is causing the error.
If I change the
magNet
to normalnn.Module
it worked just fine. But I want to use lighning module for some other reasons.Any kind of help is highly appreciated!
Thank you!!
UPDATE
I realized that the
self.hparams=something
has been removed from later versions and is no longer supported.Hence I did
That worked for me.
Beta Was this translation helpful? Give feedback.
All reactions