docstr: Similar to previous example but here we also test default
  perturbation function.
docstr_tok: ["Similar","to","previous","example","but","here","we","also","test","default","perturbation","function","."]
code: def test_convnet_multi_target_and_default_pert_func(self) -> None:
      r"""
      Similar to previous example but here we also test default
      perturbation function.
      """
      model = BasicModel_ConvNet_One_Conv()
      gbp = GuidedBackprop(model)
  
      input = torch.stack(
          [torch.arange(1, 17).float()] * 20, dim=0
      ).view(20, 1, 4, 4)
  
      sens1 = self.sensitivity_max_assert(
          gbp.attribute,
          input,
          torch.zeros(20),
          perturb_func=default_perturb_func,
          target=torch.tensor([1] * 20),
          n_perturb_samples=10,
          max_examples_per_batch=40,
      )
  
      sens2 = self.sensitivity_max_assert(
          gbp.attribute,
          input,
          torch.zeros(20),
          perturb_func=default_perturb_func,
          target=torch.tensor([1] * 20),
          n_perturb_samples=10,
          max_examples_per_batch=5,
      )
      assertTensorAlmostEqual(self, sens1, sens2)
  
imports: import typing
  from typing import Any, Callable, cast, List, Tuple, Union
  import torch
  from captum._utils.typing import BaselineType, TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr import DeepLift, GradientShap, GuidedBackprop, IntegratedGradients, Saliency
  from captum.metrics import sensitivity_max
  from captum.metrics._core.sensitivity import default_perturb_func
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel2, BasicModel4_MultiArgs, BasicModel_ConvNet_One_Conv, BasicModel_MultiLayer
  from torch import Tensor
label_desc: Use image node_id 5 for calling the Test obj's underlying member method code with example usage: obj.test_convnet_multi_target_and_default_pert_func() without return types