Skip to content

Commit f6fdb08

Browse files
committed
change formatting
1 parent 6532e35 commit f6fdb08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchvision/ops/dice_loss.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import torch
22
import torch.nn.functional as F
33

4+
45
def dice_loss(inputs: torch.Tensor, targets: torch.Tensor, reduction: str = "none", eps: float = 1e-8) -> torch.Tensor:
56
"""Criterion that computes Sørensen-Dice Coefficient loss.
67
@@ -71,4 +72,4 @@ def dice_loss(inputs: torch.Tensor, targets: torch.Tensor, reduction: str = "non
7172
f"Invalid Value for arg 'reduction': '{reduction} \n Supported reduction modes: 'none', 'mean', 'sum'"
7273
)
7374

74-
return loss
75+
return loss

0 commit comments

Comments
 (0)