-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
optimizer wrapper improve docs #3226
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Do we know what's changed that's caused the |
@jph00 I sadly don't particularly know what exactly is causing the issue. (I also don't know what version fixed this, as I didn't really use this functionality much). For some reason it looks like it's trying to do something like @tmabraham used it much more, so he may have an idea? |
There are two problems when it comes to the compose approach. This is what I am trying:
(I had also tried something similar earlier with AdaBelief) If I try passing this
I get this error:
I believe this is a limitation of fastcore's If I try with
I get the following error:
I am not sure why I get this error, but it may have something to do with the For these reasons, the |
It will be nice to know the pytorch commit that caused this, I guess pytorch is 1.7.0 but has been since some time?. So I guess the different behaviour was introduced from 1.6 to current 1.7 isn't? or we can't be sure about that? As a side note from what I know from the TPU thing, there are some tiny diffs very internal to optimizers from fastai and pytorch so perhaps could be a good time to test in deep compatibility between the two? |
closing and bringing proposed changes to #3241 |
* fix optimwrapper to work with param_groups * change optimwrapper to make it even easier to use * Update fastai/optimizer.py Co-authored-by: Jeremy Howard <github@jhoward.fastmail.fm> * incorporate jeremy's suggestions and add #3226 doc improvements * add #slow flag to cell in 14_callback.schedule.ipynb * switch to #cuda Co-authored-by: Jeremy Howard <github@jhoward.fastmail.fm>
There is often confusion about how to use
OptimWrapper
(so we can use PyTorch optimizers). Even @muellerzr has experienced some confusion in this regard (see #3225). This PR is to improve some of the documentation to clarify this. I don't know if this is the best approach so I'm open to moving the text I wrote to another location, or adding some text somewhere else, etc...