class_docstr: Integrated Gradients is an axiomatic model interpretability algorithm that
  assigns an importance score to each input feature by approximating the
  integral of gradients of the model's output with respect to the inputs
  along the path (straight line) from given baselines / references to inputs.
  
  Baselines can be provided as input arguments to attribute method.
  To approximate the integral we can choose to use either a variant of
  Riemann sum or Gauss-Legendre quadrature rule.
  
  More details regarding the integrated gradients method can be found in the
  original paper:
  https://arxiv.org/abs/1703.01365
class_docstr_tok: ["Integrated","Gradients","is","an","axiomatic","model","interpretability","algorithm","that","assigns","an","importance","score","to","each","input","feature","by","approximating","the","integral","of","gradients","of","the","model","'s","output","with","respect","to","the","inputs","along","the","path","(","straight","line",")","from","given","baselines","\/","references","to","inputs",".","Baselines","can","be","provided","as","input","arguments","to","attribute","method",".","To","approximate","the","integral","we","can","choose","to","use","either","a","variant","of","Riemann","sum","or","Gauss-Legendre","quadrature","rule",".","More","details","regarding","the","integrated","gradients","method","can","be","found","in","the","original","paper",":","https",":","\/\/arxiv.org\/abs\/1703.01365"]
code: def attribute(
      self,
      inputs: TensorOrTupleOfTensorsGeneric,
      baselines: BaselineType = None,
      target: TargetType = None,
      additional_forward_args: Any = None,
      n_steps: int = 50,
      method: str = "gausslegendre",
      internal_batch_size: Union[None, int] = None,
      return_convergence_delta: Literal[False] = False,
  ) -> TensorOrTupleOfTensorsGeneric:
      ...
  
file_path: captum/captum/attr/_core/integrated_gradients.py
imports: import typing
  from typing import Any, Callable, List, Tuple, Union
  import torch
  from captum._utils.common import _expand_additional_forward_args, _expand_target, _format_additional_forward_args, _format_output, _is_tuple
  from captum._utils.typing import BaselineType, Literal, TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr._utils.approximation_methods import approximation_parameters
  from captum.attr._utils.attribution import GradientAttribution
  from captum.attr._utils.batching import _batch_attribution
  from captum.attr._utils.common import _format_input_baseline, _reshape_and_sum, _validate_input
  from captum.log import log_usage
  from torch import Tensor
label_desc: Use image node_id 2 for calling the IntegratedGradients obj's underlying member method code with example usage: obj.attribute(inputs, baselines, target, additional_forward_args, n_steps, method, internal_batch_size, return_convergence_delta) without return types