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

[Fix] fix a bug in multi-label classification #2425

Merged
merged 4 commits into from
Apr 24, 2023
Merged

[Fix] fix a bug in multi-label classification #2425

merged 4 commits into from
Apr 24, 2023

Conversation

Dai-Wenxun
Copy link
Collaborator

@Dai-Wenxun Dai-Wenxun commented Apr 24, 2023

Motivation

#2416
fix a bug in multi-label classification.

Modification

Check whether is single-label before adding to the self.results.

if label['item'].size(0) == 1:
    # single-label
    result['label'] = label['item'].item()
else:
    # multi-label
    result['label'] = label['item'].cpu().numpy()

@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (07259a2) 76.97% compared to head (87440b9) 76.96%.

❗ Current head 87440b9 differs from pull request most recent head ac4c183. Consider uploading reports for the commit ac4c183 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2425      +/-   ##
==========================================
- Coverage   76.97%   76.96%   -0.01%     
==========================================
  Files         159      159              
  Lines       12546    12541       -5     
  Branches     2099     2098       -1     
==========================================
- Hits         9657     9652       -5     
  Misses       2386     2386              
  Partials      503      503              
Flag Coverage Δ
unittests 76.96% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
mmaction/models/heads/base.py 80.95% <ø> (ø)
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%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@cir7 cir7 merged commit 5167004 into open-mmlab:main Apr 24, 2023
@Dai-Wenxun Dai-Wenxun deleted the fix_m branch April 25, 2023 02:59
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.

3 participants