class_docstr: Implements gradient SHAP based on the implementation from SHAP's primary
  author. For reference, please view the original
  `implementation
  <https://github.com/slundberg/shap#deep-learning-example-with-gradientexplainer-tensorflowkeraspytorch-models>`_
  and the paper: `A Unified Approach to Interpreting Model Predictions
  <https://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions>`_
  
  GradientShap approximates SHAP values by computing the expectations of
  gradients by randomly sampling from the distribution of baselines/references.
  It adds white noise to each input sample `n_samples` times, selects a
  random baseline from baselines' distribution and a random point along the
  path between the baseline and the input, and computes the gradient of outputs
  with respect to those selected random points. The final SHAP values represent
  the expected values of gradients * (inputs - baselines).
  
  GradientShap makes an assumption that the input features are independent
  and that the explanation model is linear, meaning that the explanations
  are modeled through the additive composition of feature effects.
  Under those assumptions, SHAP value can be approximated as the expectation
  of gradients that are computed for randomly generated `n_samples` input
  samples after adding gaussian noise `n_samples` times to each input for
  different baselines/references.
  
  In some sense it can be viewed as an approximation of integrated gradients
  by computing the expectations of gradients for different baselines.
  
  Current implementation uses Smoothgrad from :class:`.NoiseTunnel` in order to
  randomly draw samples from the distribution of baselines, add noise to input
  samples and compute the expectation (smoothgrad).
class_docstr_tok: ["Implements","gradient","SHAP","based","on","the","implementation","from","SHAP","'s","primary","author",".","For","reference",",","please","view","the","original","`","implementation","<","https",":","\/\/github.com\/slundberg\/shap","#","deep-learning-example-with-gradientexplainer-tensorflowkeraspytorch-models",">","`","_","and","the","paper",":","`","A","Unified","Approach","to","Interpreting","Model","Predictions","<","https",":","\/\/papers.nips.cc\/paper\/7062-a-unified-approach-to-interpreting-model-predictions",">","`","_","GradientShap","approximates","SHAP","values","by","computing","the","expectations","of","gradients","by","randomly","sampling","from","the","distribution","of","baselines\/references",".","It","adds","white","noise","to","each","input","sample","`","n_samples","`","times",",","selects","a","random","baseline","from","baselines","'","distribution","and","a","random","point","along","the","path","between","the","baseline","and","the","input",",","and","computes","the","gradient","of","outputs","with","respect","to","those","selected","random","points",".","The","final","SHAP","values","represent","the","expected","values","of","gradients","*","(","inputs","-","baselines",")",".","GradientShap","makes","an","assumption","that","the","input","features","are","independent","and","that","the","explanation","model","is","linear",",","meaning","that","the","explanations","are","modeled","through","the","additive","composition","of","feature","effects",".","Under","those","assumptions",",","SHAP","value","can","be","approximated","as","the","expectation","of","gradients","that","are","computed","for","randomly","generated","`","n_samples","`","input","samples","after","adding","gaussian","noise","`","n_samples","`","times","to","each","input","for","different","baselines\/references",".","In","some","sense","it","can","be","viewed","as","an","approximation","of","integrated","gradients","by","computing","the","expectations","of","gradients","for","different","baselines",".","Current","implementation","uses","Smoothgrad","from",":","class",":","`",".NoiseTunnel","`","in","order","to","randomly","draw","samples","from","the","distribution","of","baselines",",","add","noise","to","input","samples","and","compute","the","expectation","(","smoothgrad",")","."]
code: def has_convergence_delta(self) -> bool:
      return True
  
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 5 for calling the GradientShap obj's underlying member method code with example usage: obj.has_convergence_delta() and returns: True