Skip to content

Commit e8eff3d

Browse files
committed
Merge branch 'fix-issue-8603' of https://github.com/ytl0623/MONAI into fix-issue-8603
2 parents b46f089 + 630ad7a commit e8eff3d

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
@@ -252,7 +252,7 @@ def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor:
252252

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

0 commit comments

Comments
 (0)