-
Notifications
You must be signed in to change notification settings - Fork 18
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
Training After Switch to SGD is Flat #2
Comments
Sorry for the late response, I haven't received notification of this issue. SGD generally requires some kind of lr scheduling, which is not included in this implementation. I tried adding it, however I couldnt find a nice solution to handle the SGD and Adam phase differently, which is desirable for any kind of scheduling. |
Oh I see. So in my case, what do you think should be done? I'm facing similar issue (flat accuracy after switching) |
You could try writing some kind of custom lr scheduling, since the optimizer stores the current phase in the param group with the key def custom_schedule(optimizer, compute_adam_lr, compute_sgd_lr):
for param_group in optimizer.param_groups:
if param_group['phase'] == 'SGD':
param_group['lr'] = compute_sgd_lr()
elif param_group['phase'] == 'ADAM':
param_group['lr'] = compute_adam_lr() |
I see. Thanks a lot, will try that and hopefully the problem does not occur again. Thank you @Mrpatekful |
Hi,
Thanks for the implementation of SWATS in this repository. However, when I used it on VGG-16 running for 100 epochs with initial learning rate 0.001, after switching to SGD on epoch 15, the learning curve fell significantly and it stays flat. The updated learning rate is 0.34.
Is this an expected behavior or is there any problem here?
Looking to hear from you.
Best Regards
The text was updated successfully, but these errors were encountered: