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

adapt loss to full mask #1426

Closed
wants to merge 1 commit into from
Closed

adapt loss to full mask #1426

wants to merge 1 commit into from

Conversation

marouaneamz
Copy link
Contributor

@marouaneamz marouaneamz commented Mar 20, 2023

in the pull request #1229 , for the extreme case that we have a full-mask we do for the loss = 0 which will cause problems to calculate the gradient of the loss. here i use the torch vector of the image to create a loss =0

@CLAassistant
Copy link

CLAassistant commented Mar 20, 2023

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: +86.75 🎉

Comparison is base (b8b31e9) 0.02% compared to head (30e2143) 86.77%.

❗ Current head 30e2143 differs from pull request most recent head b3294bf. Consider uploading reports for the commit b3294bf to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           dev-1.x    #1426       +/-   ##
============================================
+ Coverage     0.02%   86.77%   +86.75%     
============================================
  Files          121      170       +49     
  Lines         8217    14049     +5832     
  Branches      1368     2237      +869     
============================================
+ Hits             2    12191    +12189     
+ Misses        8215     1471     -6744     
- Partials         0      387      +387     
Flag Coverage Δ
unittests 86.77% <ø> (+86.75%) ⬆️

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

see 171 files with indirect coverage changes

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.

@@ -23,7 +23,8 @@ def wrapped(inputs, data_samples, **kwargs):
task_data_samples.append(data_sample.get(task_name))

if len(task_data_samples) == 0:
return {'loss': torch.tensor(0.), 'mask_size': torch.tensor(0.)}
loss = (inputs[0] * 0).sum()
Copy link
Contributor

Choose a reason for hiding this comment

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

@marouaneamz i think you should explain with a comment here

@Ezra-Yu Ezra-Yu changed the base branch from dev-1.x to main April 12, 2023 09:02
@Ezra-Yu Ezra-Yu changed the base branch from main to dev April 13, 2023 06:46
@Ezra-Yu Ezra-Yu changed the base branch from dev to dev-1.x April 17, 2023 04:36
@Ezra-Yu
Copy link
Collaborator

Ezra-Yu commented May 6, 2023

closed since #1530 merged.

@Ezra-Yu Ezra-Yu closed this May 6, 2023
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.

5 participants