Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update occlusion_sensitivity.py #6642

Merged
merged 3 commits into from
Jun 22, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions monai/visualize/occlusion_sensitivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
from monai.data.meta_tensor import MetaTensor
from monai.networks.utils import eval_mode
from monai.transforms import Compose, GaussianSmooth, Lambda, ScaleIntensity, SpatialCrop
from monai.utils import deprecated_arg, ensure_tuple_rep
from monai.visualize.visualizer import default_upsampler
from monai.utils import ensure_tuple_rep


class OcclusionSensitivity:
Expand Down Expand Up @@ -74,24 +73,11 @@ class OcclusionSensitivity:
- :py:class:`monai.visualize.occlusion_sensitivity.OcclusionSensitivity.`
"""

@deprecated_arg(
name="pad_val",
since="1.0",
removed="1.2",
msg_suffix="Please use `mode`. For backwards compatibility, use `mode=mean_img`.",
)
@deprecated_arg(name="stride", since="1.0", removed="1.2", msg_suffix="Please use `overlap`.")
@deprecated_arg(name="per_channel", since="1.0", removed="1.2")
@deprecated_arg(name="upsampler", since="1.0", removed="1.2")
def __init__(
self,
nn_module: nn.Module,
pad_val: float | None = None,
mask_size: int | Sequence = 16,
n_batch: int = 16,
stride: int | Sequence = 1,
per_channel: bool = True,
upsampler: Callable | None = default_upsampler,
verbose: bool = True,
mode: str | float | Callable = "gaussian",
overlap: float = 0.25,
Expand Down