Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: can't set attribute #16

Open
damlitos opened this issue Jul 5, 2023 · 0 comments
Open

AttributeError: can't set attribute #16

damlitos opened this issue Jul 5, 2023 · 0 comments

Comments

@damlitos
Copy link

damlitos commented Jul 5, 2023

Hi,

I am having an issue about setting hyperparameters as below. I understand due to version change, that's not the way to give the parameters, however I couldn't figure out what to do. Any suggestions would be great.

class T5FineTuner(pl.LightningModule):
def init(self, hparams):
super(T5FineTuner, self).init()

 self.hparams = hparams

Cell In[163], line 5, in T5FineTuner.init(self, hparams)
2 def init(self, hparams):
3 super(T5FineTuner, self).init()
----> 5 self.hparams = hparams
7 self.adam_epsilon=1e-08
8 self.data_dir='aclImdb'

File ~/.local/lib/python3.8/site-packages/torch/nn/modules/module.py:1313, in Module.setattr(self, name, value)
1311 buffers[name] = value
1312 else:
-> 1313 super().setattr(name, value)

AttributeError: can't set attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant