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

incorrect lr adjust #28

Open
Zyun-Y opened this issue Oct 20, 2020 · 1 comment
Open

incorrect lr adjust #28

Zyun-Y opened this issue Oct 20, 2020 · 1 comment

Comments

@Zyun-Y
Copy link

Zyun-Y commented Oct 20, 2020

hi,

I found an error in your code.

in the training part, you wrote 'if i + epo * len(dataloader) % decay_step == 0 and i != 0:'
by doing this, the learning rate never update.

the correct version I think should be 'if (i + epo * len(dataloader)) % decay_step == 0 and i != 0':

Ugness added a commit that referenced this issue Oct 22, 2020
@Ugness
Copy link
Owner

Ugness commented Oct 22, 2020

I think you are right. I updated train.py.
My code has a lot of out-dated coding style, and I recommend you use pytorch's lr-scheduler.
I have a plan to update this repository with torch >= 1.4.0, but it would take some time.
Thank you for making a comment.

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