docstr: Args:
  
      forward_func (Callable): The forward function of the model or
                  any modification of it.
      multiply_by_inputs (bool, optional): Indicates whether to factor
                  model inputs' multiplier in the final attribution scores.
                  In the literature this is also known as local vs global
                  attribution. If inputs' multiplier isn't factored in
                  then this type of attribution method is also called local
                  attribution. If it is, then that type of attribution
                  method is called global.
                  More detailed can be found here:
                  https://arxiv.org/abs/1711.06104
  
                  In case of gradient shap, if `multiply_by_inputs`
                  is set to True, the sensitivity scores of scaled inputs
                  are being multiplied by (inputs - baselines).
docstr_tok: ["Args",":","forward_func","(","Callable",")",":","The","forward","function","of","the","model","or","any","modification","of","it",".","multiply_by_inputs","(","bool",",","optional",")",":","Indicates","whether","to","factor","model","inputs","'","multiplier","in","the","final","attribution","scores",".","In","the","literature","this","is","also","known","as","local","vs","global","attribution",".","If","inputs","'","multiplier","is","n't","factored","in","then","this","type","of","attribution","method","is","also","called","local","attribution",".","If","it","is",",","then","that","type","of","attribution","method","is","called","global",".","More","detailed","can","be","found","here",":","https",":","\/\/arxiv.org\/abs\/1711.06104","In","case","of","gradient","shap",",","if","`","multiply_by_inputs","`","is","set","to","True",",","the","sensitivity","scores","of","scaled","inputs","are","being","multiplied","by","(","inputs","-","baselines",")","."]
code: def __init__(
      self, forward_func: Callable, multiply_by_inputs=True
  ) -> None:
      r"""
      Args:
  
          forward_func (Callable): The forward function of the model or
                      any modification of it.
          multiply_by_inputs (bool, optional): Indicates whether to factor
                      model inputs' multiplier in the final attribution scores.
                      In the literature this is also known as local vs global
                      attribution. If inputs' multiplier isn't factored in
                      then this type of attribution method is also called local
                      attribution. If it is, then that type of attribution
                      method is called global.
                      More detailed can be found here:
                      https://arxiv.org/abs/1711.06104
  
                      In case of gradient shap, if `multiply_by_inputs`
                      is set to True, the sensitivity scores of scaled inputs
                      are being multiplied by (inputs - baselines).
  
      """
      GradientAttribution.__init__(self, forward_func)
      self._multiply_by_inputs = multiply_by_inputs
  
imports: import typing
  from typing import Any, Callable, Tuple, Union
  import numpy
  import torch
  from captum._utils.common import _is_tuple
  from captum._utils.typing import BaselineType, Literal, TargetType, Tensor, TensorOrTupleOfTensorsGeneric
  from captum.attr._core.noise_tunnel import NoiseTunnel
  from captum.attr._utils.attribution import GradientAttribution
  from captum.attr._utils.common import _compute_conv_delta_and_format_attrs, _format_callable_baseline, _format_input_baseline
  from captum.log import log_usage
label_desc: Use image node_id 1 to create a new InputBaselineXGradient object from inherited base classes: GradientAttribution with example: obj = InputBaselineXGradient(forward_func, multiply_by_inputs)