Skip to content

Commit 630ad7a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b7a5013 commit 630ad7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

monai/losses/unified_focal_loss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor:
250250

251251
if y_true.shape[1] == self.num_classes:
252252
if not torch.all((y_true == 0) | (y_true == 1)):
253-
raise ValueError(f"y_true appears to be one-hot but contains values other than 0 and 1")
253+
raise ValueError("y_true appears to be one-hot but contains values other than 0 and 1")
254254
elif y_true.shape[1] == 1:
255255
if torch.max(y_true) >= self.num_classes:
256256
raise ValueError(

0 commit comments

Comments
 (0)