-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Official OcclusionSensitivity example is not workable #2030
Description
Dear Sir,
I just copied and pasted the commands from MONAI official documentation (see: https://docs.monai.io/en/latest/visualize.html?highlight=OcclusionSensitivity)
It is here: It is for the use of 3d OcclusionSensitivity.

I ran the code and used the correct version of Monai (0.5.0). I did not revise anything but got an error. I ran:
densenet 3d
import torch
from monai.networks.nets import DenseNet
from monai.visualize import OcclusionSensitivity
model_3d = DenseNet(spatial_dims=3, in_channels=1, out_channels=3, init_features=2, growth_rate=2, block_config=(6,))
occ_sens = OcclusionSensitivity(nn_module=model_3d, n_batch=10, stride=2)
occ_map, most_probable_class = occ_sens(torch.rand(1, 1, 6, 6, 6), b_box=[-1, -1, 2, 3, -1, -1, -1, -1])
Could you provide some sugeestions? Thank you.
