This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Exactly reproduce 56 layers ResNet on CIFAR10#2046
Merged
antinucleon merged 3 commits intoapache:masterfrom May 9, 2016
Merged
Exactly reproduce 56 layers ResNet on CIFAR10#2046antinucleon merged 3 commits intoapache:masterfrom
antinucleon merged 3 commits intoapache:masterfrom
Conversation
Contributor
| # Note we use kernel (2, 2) rather than (1, 1) and a custom initializer | ||
| # in train_cifar10_resnet.py | ||
| # Test accuracy 0.918 on CIFAR10 with 56 layers and kernel (1, 1) | ||
| # TODO: Don't know why (1, 1) got much lower accuracy |
Contributor
There was a problem hiding this comment.
please use TODO(Answeror), otherwise it's hard for others to track the TODO
Contributor
|
May I ask if you are using cudnn for this experiment? The 1e-5 eps get gives bad_param error. By adding 1e-9(my coworker used that value), it works well now. |
Contributor
Author
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Test accuracy are 0.9309 and 0.9303 in this patch and Kaiming He's paper, respectively.
The accuracy is the best one of the last 3 epochs (0.930288, 0.930889 and 0.929587), while the original paper select the best one in 5 runs. The dockerfile and log are in: https://gist.github.com/Answeror/f9160145e1c64bb509f52c00014bdb77
The only difference between this patch and Facebook's implementation (https://github.com/gcr/torch-residual-networks and https://github.com/facebook/fb.resnet.torch) are:
Some details affect the accuracy:
train_cifar10_resnet.pyfor details.fix_gamma=Falsein BatchNorm (gamma is necessary because of the weight decay of the conv weight)And thanks #1230 (@freesouls) and #1041 (@shuokay) to provide preliminary implementations.
update@2016-06-08
With #2366 and a batch size of 64, I got an accuracy of 0.939704 after 200 epochs on 2 GPUs.
Note, the accuracy is strongly affected by the batch size, the more GPU you use, the smaller batch size should be.
See https://gist.github.com/Answeror/f9160145e1c64bb509f52c00014bdb77#file-resnet-dual-gpu-log for the full log.