-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[Bug fixed]Fix dice_loss errors #417
Conversation
Codecov Report
@@ Coverage Diff @@
## master #417 +/- ##
==========================================
- Coverage 86.44% 86.38% -0.07%
==========================================
Files 97 97
Lines 4958 4957 -1
Branches 805 804 -1
==========================================
- Hits 4286 4282 -4
- Misses 517 519 +2
- Partials 155 156 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Hi @zhongqiu1245 |
Thanks, it works perfectly |
mmseg/models/losses/dice_loss.py
Outdated
assert loss_type in ['multi_class', 'binary'] | ||
if loss_type == 'multi_class': | ||
self.cls_criterion = dice_loss | ||
else: | ||
self.cls_criterion = binary_dice_loss | ||
# assert loss_type in ['multi_class', 'binary'] | ||
# if loss_type == 'multi_class': | ||
# # self.cls_criterion = dice_loss | ||
# self.binary_cls = False | ||
# else: | ||
# # self.cls_criterion = binary_dice_loss | ||
# self.binary_cls = True | ||
# self.cls_criterion = dice_loss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why comment these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cause dice_loss()
method has handled these two cases, I think it's no need to add extra codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, we could delete this code.
Kindly ping @xiexinch |
I will update it soon, sorry.. |
|
* fix training bugs * fix unitest error * fix error in num_classes==2 case * delete comments
* Update conditional_image_generation.mdx * Update unconditional_image_generation.mdx
* update template * update emoji
Fix training errors #411