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

Step_counter not defined ? #1

Open
tchaton opened this issue Aug 22, 2019 · 1 comment
Open

Step_counter not defined ? #1

tchaton opened this issue Aug 22, 2019 · 1 comment

Comments

@tchaton
Copy link

tchaton commented Aug 22, 2019

optimizer.step()

File "/home/thomas/HELIX/superpoint-graph-job/superpointgraph2/learning/refactor/models/optimizers.py", line 33, in step
group['step_counter'] += 1
KeyError: 'step_counter'

Do you have any idea how it can be solved ? I would like to try it out with Radam
base_optim = RAdam(model.parameters())
return Lookahead(base_optim, k=5, alpha=0.5)

My model is special bec it is built over pytorch geometric.

@lonePatient
Copy link
Owner

@tchaton get it a try:

from radam import Radam
base_optim = RAdam(model.parameters(),lr = 0.001) 
optimizer =  Lookahead(base_optim, k=5, alpha=0.5)

I try, no problem

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

2 participants