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] Add DeiT backbone and checkpoints. #576

Merged
merged 13 commits into from
Dec 15, 2021
Merged

Conversation

mzr1996
Copy link
Member

@mzr1996 mzr1996 commented Dec 2, 2021

Motivation

Add support of DeiT.

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.

@mzr1996 mzr1996 requested a review from Ezra-Yu December 2, 2021 06:31
@codecov
Copy link

codecov bot commented Dec 2, 2021

Codecov Report

Merging #576 (157610e) into master (894a82e) will increase coverage by 0.23%.
The diff coverage is 96.73%.

❗ Current head 157610e differs from pull request most recent head 63cf046. Consider uploading reports for the commit 63cf046 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #576      +/-   ##
==========================================
+ Coverage   80.11%   80.34%   +0.23%     
==========================================
  Files         113      115       +2     
  Lines        6526     6585      +59     
  Branches     1120     1125       +5     
==========================================
+ Hits         5228     5291      +63     
+ Misses       1153     1151       -2     
+ Partials      145      143       -2     
Flag Coverage Δ
unittests 80.34% <96.73%> (+0.23%) ⬆️

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

Impacted Files Coverage Δ
mmcls/models/backbones/vision_transformer.py 97.05% <91.66%> (+3.26%) ⬆️
mmcls/models/backbones/deit.py 97.50% <97.50%> (ø)
mmcls/models/backbones/__init__.py 100.00% <100.00%> (ø)
mmcls/models/heads/__init__.py 100.00% <100.00%> (ø)
mmcls/models/heads/deit_head.py 100.00% <100.00%> (ø)

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 6f25beb...63cf046. Read the comment docs.

Copy link
Collaborator

@Ezra-Yu Ezra-Yu left a comment

Choose a reason for hiding this comment

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

remember to modify the readme.md#Benchmark and model zoo

mmcls/models/heads/deit_head.py Show resolved Hide resolved
configs/deit/README.md Outdated Show resolved Hide resolved
configs/deit/README.md Outdated Show resolved Hide resolved
mmcls/models/heads/deit_head.py Outdated Show resolved Hide resolved
@mzr1996 mzr1996 requested a review from Ezra-Yu December 15, 2021 08:39
Copy link
Collaborator

@Ezra-Yu Ezra-Yu 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 f9a2b04 into open-mmlab:master Dec 15, 2021
@mzr1996 mzr1996 deleted the deit branch July 20, 2022 06:58
mzr1996 added a commit to mzr1996/mmpretrain that referenced this pull request Nov 24, 2022
* Support DeiT backbone.

* Use hook to automatically resize pos embed

* Update ViT training setting

* Add deit configs and update docs

* Fix vit arch assertion

* Remove useless init function

* Add unit tests.

* Fix resize_pos_embed for DeiT

* Improve according to comments.
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.

2 participants