Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
Signed-off-by: KumoLiu <[email protected]>
  • Loading branch information
KumoLiu committed Sep 1, 2023
1 parent bfb1ec7 commit b1fb99f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions monai/losses/dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,7 @@ def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch.Tensor:
f"got shape {input.shape} and {target.shape}."
)
if input.shape[1] == 1:
raise ValueError(
"the number of channels for input should be larger than 1,"
f"got shape {input.shape}."
)
raise ValueError("the number of channels for input should be larger than 1," f"got shape {input.shape}.")

dice_loss = self.dice(input, target)
ce_loss = self.ce(input, target)
Expand Down

0 comments on commit b1fb99f

Please sign in to comment.