-
Notifications
You must be signed in to change notification settings - Fork 290
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
Guarin lig 3062 add mocov2 imagenet benchmark #1291
Merged
guarin
merged 14 commits into
master
from
guarin-lig-3062-add-mocov2-imagenet-benchmark
Dec 14, 2023
Merged
Guarin lig 3062 add mocov2 imagenet benchmark #1291
guarin
merged 14 commits into
master
from
guarin-lig-3062-add-mocov2-imagenet-benchmark
Dec 14, 2023
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
* This fixes cyclic imports between lightly(models/modules and lightly/losses
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1291 +/- ##
==========================================
+ Coverage 85.24% 85.33% +0.09%
==========================================
Files 130 131 +1
Lines 5517 5566 +49
==========================================
+ Hits 4703 4750 +47
- Misses 814 816 +2 ☔ View full report in Codecov by Sentry. |
* Increase min_scale from 0.08 to 0.2 * Decrease color jitter strengths
* Add feature dimension when setting memory bank size. * Cleanup memory bank implementation. * Add `feature_dim_first` argument to memory bank. * Update classes/functions using memory bank from `size=num_features` to `size=(num_features, dim)`.
…ocov2-imagenet-benchmark
guarin
commented
Dec 11, 2023
ersi-lightly
approved these changes
Dec 14, 2023
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.
Changes
gather_distributed
option toMemoryBankModule
memory_bank.py
fromlightly/loss
tolightly/modules/models
MemoryBankModule
inlightly/modules/models/nn_memory_bank.py
)Closes #1288
Closes #1018
Results
Ran a benchmark using the code from #1009:
The results are slightly worse than expected. I would expect similar performance as SimCLR which has 63.2% linear top1 accuracy while mocov2 has only 60.8 here. I figured out that the transform parameters are slightly different in the original code and made an additional PR to update them: #1441. Will run a new benchmark with those parameters.
New results using this branch:
It is still slightly worse than SimCLR which has 63.2% linear top 1, while MoCov2 has 61.5%. I think we can merge it like that, I can't find any differences atm. A possible reason might be that we use the SimCLR version with optimized lr for smaller batch sizes.
Review
When reviewing please only consider these files:
benchmarks/imagenet/resnet50/mocov2.py
README.md
benchmarks.rst
The other files have already been reviewed when their respective PRs were merged into this branch.