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

**_config in train.py optimizer definition #38

Closed
ruohuali opened this issue Feb 22, 2021 · 4 comments
Closed

**_config in train.py optimizer definition #38

ruohuali opened this issue Feb 22, 2021 · 4 comments

Comments

@ruohuali
Copy link

ruohuali commented Feb 22, 2021

Hello
Why in train.py's optimizer definition **_config is used instead of _config?
optimizer = torch.optim.SGD(model.parameters(), **_config['optim'])
This caused error when I tried to run train.py
optimizer = torch.optim.SGD(model.parameters(), **_config['optim']) KeyError: 'optim'
Thx for the help!

@DpDark
Copy link

DpDark commented Apr 5, 2021

Hello, I have the same problem. How did you solve it?

@2679622694
Copy link

I have the same question

@sharmaannapurna
Copy link

HI, I am getting the same error when I tried to run the code. Any workaround?

@ruohuali
Copy link
Author

I vaguely recall that it was a mistake about using wrong setup in config.py (I used test when it should be train or something like that).

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

4 participants