diff --git a/monailabel/transform/post.py b/monailabel/transform/post.py index cf4abdf96..615040474 100644 --- a/monailabel/transform/post.py +++ b/monailabel/transform/post.py @@ -129,7 +129,7 @@ def __call__(self, data): spatial_size = spatial_shape[-len(current_size) :] # Undo Spacing - if np.any(np.not_equal(current_size, spatial_size)): + if torch.any(torch.Tensor(np.not_equal(current_size, spatial_size))): resizer = Resize(spatial_size=spatial_size, mode=self.mode[idx]) result = resizer(result, mode=self.mode[idx], align_corners=self.align_corners[idx])