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 typo #1667

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mmseg/models/losses/dice_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def dice_loss(pred,


@weighted_loss
def binary_dice_loss(pred, target, valid_mask, smooth=1, exponent=2, **kwards):
def binary_dice_loss(pred, target, valid_mask, smooth=1, exponent=2, **kwargs):
assert pred.shape[0] == target.shape[0]
pred = pred.reshape(pred.shape[0], -1)
target = target.reshape(target.shape[0], -1)
Expand Down Expand Up @@ -79,7 +79,7 @@ def __init__(self,
loss_weight=1.0,
ignore_index=255,
loss_name='loss_dice',
**kwards):
**kwargs):
super(DiceLoss, self).__init__()
self.smooth = smooth
self.exponent = exponent
Expand All @@ -94,7 +94,7 @@ def forward(self,
target,
avg_factor=None,
reduction_override=None,
**kwards):
**kwargs):
assert reduction_override in (None, 'none', 'mean', 'sum')
reduction = (
reduction_override if reduction_override else self.reduction)
Expand Down