code: def test_basic_multi_input(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.zeros(batch_size_baselines, 3),
          torch.zeros(batch_size_baselines, 4),
      )
  
      model = BasicLinearModel()
      model.eval()
      model.zero_grad()
  
      np.random.seed(0)
      torch.manual_seed(0)
      gradient_shap = GradientShap(model)
      n_samples = 50
      attributions, delta = cast(
          Tuple[Tuple[Tensor, ...], Tensor],
          gradient_shap.attribute(
              inputs,
              baselines,
              n_samples=n_samples,
              return_convergence_delta=True,
          ),
      )
      attributions_without_delta = gradient_shap.attribute(
          (x1, x2), baselines
      )
  
      _assert_attribution_delta(
          self, inputs, attributions, n_samples, delta
      )
      # Compare with integrated gradients
      ig = IntegratedGradients(model)
      baselines = (
          torch.zeros(batch_size, 3),
          torch.zeros(batch_size, 4),
      )
      attributions_ig = ig.attribute(inputs, baselines=baselines)
      self._assert_shap_ig_comparision(attributions, attributions_ig)
  
      # compare attributions retrieved with and without
      # `return_convergence_delta` flag
      for attribution, attribution_without_delta in zip(
          attributions, attributions_without_delta
      ):
          assertTensorAlmostEqual(
              self, attribution, attribution_without_delta
          )
  
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 1 for calling the Test obj's underlying member method code with example usage: obj.test_basic_multi_input() without return types