-
Couldn't load subscription status.
- Fork 45.4k
More Preprocessing tuning for Resnet #3558
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
Conversation
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
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.
It looks like you're mainly swapping in code from https://github.com/tensorflow/models/blob/master/research/inception/inception/image_processing.py, right? Would it work better to just switch to that file?
Also, this PR ended up somehow including a commit from https://github.com/MTDzi, which I don't think you intended.
official/resnet/imagenet_main.py
Outdated
| image/encoded (a JPEG-encoded string) and image/class/label (int) | ||
| The output of the build_image_data.py image preprocessing script is a dataset | ||
| containing serialized Example protocol buffers. Each Example proto contains | ||
| the following fields: |
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.
The numbers below are example values, right? Could we specify that in this comment?
|
Regardless, nice work on 76+% accuracy! |
|
As I understand it, there are several names around preprocessing that are used colloquially-- "inception," "resnet," and "vgg." Inception does more color distortion, which can improve accuracy, but slows down processing. Resnet is what we now have here, and VGG is similar, but doing the aspect-preserving-resize and no bounding boxes. We now have what we might call Resnet preprocessing, pulled largely from tf_cnn_benchmarks, but with fewer flags and options for simplicity. The linked inception preprocessing has the aforementioned color distortion, no fused op, etc., so a little more complex. Arguably, we might want to rename the vgg file at this point, but for now, probably okay to leave. Pulling in the random commits was my attempt to squash a bunch of debugging commits and a master merge, but that ended in confusion and regret, as git rebasing always seems to :/ I think the changes made, however, are limited to the set intended to be made, with only the commit messages weirdly included. Comment updated-- thanks for the review. |
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'm in favor of renaming to resnet_preprocessing, as right now the VGG name and the docstring at the top of the file aren't quite accurate for what the code actually does.
Also, we should definitely fix up the commit situation before merging. I would suggest just taking a git diff and writing that to a patch file, then hard resetting to the same state as master and git apply-ing your patch file to create a single commit. Then you can force push to overwrite this branch so that only your single commit is present.
These changes bring us to 76+% accuracy, and also improve performance, especially for the 8 GPU case. Notable differences in training:
Eval is the same as previously, but cleaned up slightly now that the functions are not used for training as well.
Screenshot from a run with 4xGPU is below.
FYI @reedwm @bignamehyp @scott7z @robieta