code: def test_basic_multi_input_wo_mutliplying_by_inputs(self) -> None:
      batch_size = 10
  
      x1 = torch.ones(batch_size, 3)
      x2 = torch.ones(batch_size, 4)
      inputs = (x1, x2)
  
      batch_size_baselines = 20
      baselines = (
          torch.ones(batch_size_baselines, 3) + 2e-5,
          torch.ones(batch_size_baselines, 4) + 2e-5,
      )
  
      model = BasicLinearModel()
      model.eval()
      model.zero_grad()
  
      np.random.seed(0)
      torch.manual_seed(0)
      gradient_shap = GradientShap(model)
      gradient_shap_wo_mutliplying_by_inputs = GradientShap(
          model, multiply_by_inputs=False
      )
      n_samples = 50
      attributions = cast(
          Tuple[Tuple[Tensor, ...], Tensor],
          gradient_shap.attribute(
              inputs,
              baselines,
              n_samples=n_samples,
              stdevs=0.0,
          ),
      )
      attributions_wo_mutliplying_by_inputs = cast(
          Tuple[Tuple[Tensor, ...], Tensor],
          gradient_shap_wo_mutliplying_by_inputs.attribute(
              inputs,
              baselines,
              n_samples=n_samples,
              stdevs=0.0,
          ),
      )
      assertTensorAlmostEqual(
          self,
          attributions_wo_mutliplying_by_inputs[0]
          * (x1 - baselines[0][0:1]),
          attributions[0],
      )
      assertTensorAlmostEqual(
          self,
          attributions_wo_mutliplying_by_inputs[1]
          * (x2 - baselines[1][0:1]),
          attributions[1],
      )
  
file_path: captum/tests/attr/test_gradient_shap.py
imports: from typing import cast, Tuple, Union
  import numpy
  import torch
  from captum._utils.typing import Tensor
  from captum.attr._core.gradient_shap import GradientShap
  from captum.attr._core.integrated_gradients import IntegratedGradients
  from numpy import ndarray
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicLinearModel, BasicModel2
  from tests.helpers.classification_models import SoftmaxModel
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_basic_multi_input_wo_mutliplying_by_inputs() without return types