-
Notifications
You must be signed in to change notification settings - Fork 3.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
model_split seems a little problem. Adam cannot get head_params, and cannot update head params! #598
Open
HaronCHou
wants to merge
21
commits into
fastai:master
Choose a base branch
from
jav0927:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Old file
Old file
Had some missing textual information
Incorrect code
incorrect information
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://github.com/jav0927/course-v3/blob/master/Fastai2_SSD_Model.ipynb
def model_split(m): return L(m.body[0], m.body[1], m.body[2], m.body[3], m.body[4], m.body[5], m.body[6], m.body[7], m.drop).map(params)
epoch train_loss valid_loss time
0 48.916576 47.567001 00:55
1 48.897285 47.704815 00:54
2 48.736855 47.622379 00:54
if I change model_split as follows:
def model_split(m): body_params, head_params = L(),L() # body_params = L(m.body[0], m.body[1], m.body[2], m.body[3], m.body[4], m.body[5], m.body[6], m.body[7], m.drop).map(params) # head_params = L(m.sconv0, m.sconv1, m.sconv2, m.sconv3, m.out0, m.out1, m.out2, m.out3).map(params) for p in m.body: body_params += params(p) head_params += params(m.sconv0) head_params += params(m.sconv1) head_params += params(m.sconv2) head_params += params(m.sconv3) head_params += params(m.out0) head_params += params(m.out1) head_params += params(m.out2) head_params += params(m.out3) return L(body_params, head_params)
Then, loss like:
I think probably this is a problem