Skip to content

Commit

Permalink
delete comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xiexinch committed Mar 29, 2021
1 parent b8a76ab commit 22f9fb4
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions mmseg/models/losses/dice_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,15 @@ class DiceLoss(nn.Module):
ignore_index (int | None): The label index to be ignored. Default: 255.
"""

def __init__(
self,
# loss_type='multi_class',
smooth=1,
exponent=2,
reduction='mean',
class_weight=None,
loss_weight=1.0,
ignore_index=255,
**kwards):
def __init__(self,
smooth=1,
exponent=2,
reduction='mean',
class_weight=None,
loss_weight=1.0,
ignore_index=255,
**kwards):
super(DiceLoss, self).__init__()
# 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
self.smooth = smooth
self.exponent = exponent
self.reduction = reduction
Expand Down

0 comments on commit 22f9fb4

Please sign in to comment.