class_docstr: Implements ML framework independent version of Guided IG.
class_docstr_tok: ["Implements","ML","framework","independent","version","of","Guided","IG","."]
code: def _get_grad_func(self, call_model_function, call_model_args):
      def _grad_func(x_value):
          call_model_output = call_model_function(
              np.expand_dims(x_value, axis=0),
              call_model_args=call_model_args,
              expected_keys=self.expected_keys,
          )
          return np.asarray(
              call_model_output[INPUT_OUTPUT_GRADIENTS][0]
          )
  
      return _grad_func
  
file_path: saliency/saliency/core/guided_ig.py
imports: from .base import CoreSaliency
  from .base import INPUT_OUTPUT_GRADIENTS
  import math
  import numpy
label_desc: Use image node_id 2 for calling the GuidedIG obj's underlying member method code with example usage: obj._get_grad_func(call_model_function, call_model_args) and returns: _grad_func, np