-
Notifications
You must be signed in to change notification settings - Fork 617
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
[feat] Adding Metaformer support #294
Conversation
9820481
to
93ec973
Compare
Codecov Report
@@ Coverage Diff @@
## main #294 +/- ##
==========================================
+ Coverage 92.80% 92.95% +0.14%
==========================================
Files 64 65 +1
Lines 3489 3519 +30
==========================================
+ Hits 3238 3271 +33
+ Misses 251 248 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
70a3c7d
to
7a96bc3
Compare
the coverage numbers should be fixed by the PR update, it's now properly tested |
327f447
to
550cff9
Compare
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.
Looks great!
|
||
### MicroMetaformer | ||
|
||
This is very close to the MicroViT example above, but illustrating the use of a hierarchical Transformer ([Metaformer](https://arxiv.org/pdf/2111.11418.pdf)) this time, through a helper function which generates the required configuration given the pooling parameters. The suggested configuration is about 6.6M parameters big (half of a ResNet18) and trains to about 86% top-1 Cifar10 within minutes. |
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.
Nice!
What does this PR do?
Add a helper to generate a Metaformer config, and add an example to train it on Cifar10. Add some documentation about it
TODO
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.