Skip to content
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

[Feature] Support ConvMixer #716

Merged
merged 13 commits into from
Mar 23, 2022
Merged

[Feature] Support ConvMixer #716

merged 13 commits into from
Mar 23, 2022

Conversation

yingfhu
Copy link
Collaborator

@yingfhu yingfhu commented Mar 2, 2022

Motivation

Support ConvMixer and add converted models from origin repo.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@yingfhu yingfhu marked this pull request as draft March 2, 2022 03:22
@codecov
Copy link

codecov bot commented Mar 2, 2022

Codecov Report

Merging #716 (8267f3f) into dev (aa522f4) will increase coverage by 0.07%.
The diff coverage is 98.38%.

❗ Current head 8267f3f differs from pull request most recent head 4a74b89. Consider uploading reports for the commit 4a74b89 to get more accurate results

@@            Coverage Diff             @@
##              dev     #716      +/-   ##
==========================================
+ Coverage   85.04%   85.11%   +0.07%     
==========================================
  Files         123      124       +1     
  Lines        7603     7666      +63     
  Branches     1311     1324      +13     
==========================================
+ Hits         6466     6525      +59     
- Misses        945      946       +1     
- Partials      192      195       +3     
Flag Coverage Δ
unittests 85.05% <96.77%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmcls/models/backbones/convmixer.py 98.36% <98.36%> (ø)
mmcls/models/backbones/__init__.py 100.00% <100.00%> (ø)
mmcls/utils/setup_env.py 95.45% <0.00%> (-4.55%) ⬇️
mmcls/datasets/builder.py 89.55% <0.00%> (-2.88%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa522f4...4a74b89. Read the comment docs.

@Ezra-Yu Ezra-Yu mentioned this pull request Mar 3, 2022
27 tasks
@yingfhu yingfhu marked this pull request as ready for review March 3, 2022 08:45
@yingfhu yingfhu requested review from Ezra-Yu and mzr1996 March 3, 2022 08:46
@yingfhu yingfhu force-pushed the add-convmixer branch 2 times, most recently from 7719006 to a44ad12 Compare March 3, 2022 09:46
@@ -0,0 +1,71 @@
_base_ = ['./pipelines/rand_aug.py']

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference with imagenet_bs64_swin_224.py? If no difference, just reuse that file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test pipeline resize 233

Comment on lines +132 to +134
convfunc = nn.Conv2d
if digit_version(torch.__version__) < digit_version('1.9.0'):
convfunc = Conv2dAdaptivePadding
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the Conv2d in torch>=1.9.0 is the same as Conv2dAdaptivePadding in torch<1.9.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same as Conv2dAdaptivePadding in mmcv

configs/convmixer/convmixer-1024-20_10xb64_in1k.py Outdated Show resolved Hide resolved
configs/convmixer/README.md Outdated Show resolved Hide resolved
configs/convmixer/README.md Outdated Show resolved Hide resolved
@CLAassistant
Copy link

CLAassistant commented Mar 16, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@mzr1996 mzr1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mzr1996 mzr1996 merged commit 04cb42a into open-mmlab:dev Mar 23, 2022
mzr1996 added a commit to mzr1996/mmpretrain that referenced this pull request Nov 24, 2022
* basic support for ConvMixer

* simplify

* add data pipeine config for timm

* Add model readme and metafile

* add unittest for convmixer

* add copyright

* modify

* add tests

* update model

* add conv2dAdaptivePadding replacement

* update model index

* fix comments

* Update checkpoint path

Co-authored-by: mzr1996 <mzr1996@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants