-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix sgd bug and add demo notebook #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor query about whether we could use an existing test to verify the new behaviour, but otherwise LGTM.
The notebook is excellent & very clear - thank you for that!
unit_scaling/tests/test_optim.py
Outdated
@@ -48,7 +48,7 @@ def test_scaled_parameters(opt: str) -> None: | |||
base_wd = 0.001 | |||
param_groups = scaled_parameters( | |||
model.parameters(), | |||
dict(sgd=lr_scale_func_sgd, adam=lr_scale_func_adam)[opt], | |||
dict(sgd=lr_scale_func_sgd("to_output_scale"), adam=lr_scale_func_adam)[opt], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should instead change the final layer to a LinearReadout
and use this to test the new behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done this, and corrected the input scaling rule which I hadn't actually adjusted. It then clicked that in this case it now (of course!) reduces to the adam rules, so I've modified the code to reflect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brill, thanks, LGTM!
860223e
to
60f8f6d
Compare
No description provided.