Skip to content

Commit be14db4

Browse files
pre-commit-ci[bot]ryancinsight
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci Signed-off-by: Ryan Clanton <55164720+ryancinsight@users.noreply.github.com>
1 parent 6f16197 commit be14db4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

monai/losses/dice.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,15 +834,15 @@ def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch.Tensor:
834834
"""
835835
if len(input.shape) != len(target.shape):
836836
raise ValueError("the number of dimensions for input and target should be the same.")
837-
837+
838838
n_pred_ch = input.shape[1]
839-
839+
840840
if self.to_onehot_y:
841841
if n_pred_ch == 1:
842842
warnings.warn("single channel prediction, `to_onehot_y=True` ignored.")
843843
else:
844844
target = one_hot(target, num_classes=n_pred_ch)
845-
845+
846846
if not self.include_background:
847847
if n_pred_ch == 1:
848848
warnings.warn("single channel prediction, `include_background=False` ignored.")

0 commit comments

Comments
 (0)