Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Fix] Fix a bug of MViT when set with_cls_token to False #2480

Merged
merged 2 commits into from
May 18, 2023
Merged

[Fix] Fix a bug of MViT when set with_cls_token to False #2480

merged 2 commits into from
May 18, 2023

Conversation

KeepLost
Copy link
Contributor

Resolve the problem when class token is taken away in MViT.

Put more precisely, when with_cls_token and output_cls_token are both set False in model MViT, an error would occur because its MultiScaleBlockand MultiScaleAttention components don't pass the with_cls_token argument from class MViT, and set it True by default.

resolve the problem when class token is taken away
@CLAassistant
Copy link

CLAassistant commented May 17, 2023

CLA assistant check
All committers have signed the CLA.

@cir7
Copy link
Collaborator

cir7 commented May 17, 2023

Thanks for your contribution! this is indeed a bug, we will merge it after review.

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 80.55% and project coverage change: -0.05 ⚠️

Comparison is base (07259a2) 76.97% compared to head (ca5da02) 76.93%.

❗ Current head ca5da02 differs from pull request most recent head 626332a. Consider uploading reports for the commit 626332a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2480      +/-   ##
==========================================
- Coverage   76.97%   76.93%   -0.05%     
==========================================
  Files         159      159              
  Lines       12546    12554       +8     
  Branches     2099     2102       +3     
==========================================
+ Hits         9657     9658       +1     
- Misses       2386     2390       +4     
- Partials      503      506       +3     
Flag Coverage Δ
unittests 76.93% <80.55%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
mmaction/datasets/transforms/wrappers.py 56.34% <0.00%> (-0.91%) ⬇️
mmaction/models/backbones/mvit.py 78.81% <ø> (ø)
mmaction/models/heads/base.py 80.95% <ø> (ø)
mmaction/models/heads/mvit_head.py 82.85% <50.00%> (-7.47%) ⬇️
mmaction/models/utils/blending_utils.py 90.62% <84.61%> (-1.51%) ⬇️
mmaction/__init__.py 100.00% <100.00%> (ø)
mmaction/evaluation/metrics/acc_metric.py 81.29% <100.00%> (-0.70%) ⬇️
mmaction/models/losses/cross_entropy_loss.py 65.27% <100.00%> (+0.48%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cir7 cir7 changed the title Update mvit.py [Fix] Fix a bug of MViT when set with_cls_token to False May 18, 2023
@cir7 cir7 merged commit b7af9d3 into open-mmlab:main May 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants