From 1a6756207ed51f7a53f5f5b5973c113e3fe2fe2c Mon Sep 17 00:00:00 2001 From: Adam Aji <3487395+adamaji@users.noreply.github.com> Date: Sat, 13 Mar 2021 13:30:09 +0000 Subject: [PATCH] TEST: Fix failing pytype check for predict_segmentation Introduced by 0bd86b14 Signed-off-by: Adam Aji <3487395+adamaji@users.noreply.github.com> --- monai/networks/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monai/networks/utils.py b/monai/networks/utils.py index bd25e358f6..c5989f174b 100644 --- a/monai/networks/utils.py +++ b/monai/networks/utils.py @@ -71,9 +71,7 @@ def slice_channels(tensor: torch.Tensor, *slicevals: Optional[int]) -> torch.Ten return tensor[slices] -def predict_segmentation( - logits: torch.Tensor, mutually_exclusive: bool = False, threshold: float = 0.0 -) -> torch.Tensor: +def predict_segmentation(logits: torch.Tensor, mutually_exclusive: bool = False, threshold: float = 0.0) -> Any: """ Given the logits from a network, computing the segmentation by thresholding all values above 0 if multi-labels task, computing the `argmax` along the channel axis if multi-classes task,