def METHOD_NAME(self, cam_class):
    model = DenseNet121(spatial_dims=2, in_channels=1, out_channels=3)
    for name, x in model.named_parameters():
        if "features" in name:
            x.requires_grad = False
    cam = cam_class(nn_module=model, target_layers="class_layers.relu")
    image = torch.rand((2, 1, 48, 64))
    with self.assertRaises(IndexError):
        cam(x=image)