class_docstr: A CoreSaliency class that computes saliency masks using the XRAI method.
class_docstr_tok: ["A","CoreSaliency","class","that","computes","saliency","masks","using","the","XRAI","method","."]
docstr: Takes mean of attributions from all baselines.
docstr_tok: ["Takes","mean","of","attributions","from","all","baselines","."]
code: def _get_integrated_gradients(
      self,
      im,
      call_model_function,
      call_model_args,
      baselines,
      steps,
      batch_size,
  ):
      """Takes mean of attributions from all baselines."""
      grads = []
      for baseline in baselines:
          grads.append(
              self._integrated_gradients.GetMask(
                  im,
                  call_model_function,
                  call_model_args=call_model_args,
                  x_baseline=baseline,
                  x_steps=steps,
                  batch_size=batch_size,
              )
          )
  
      return grads
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from .base import CoreSaliency
  from .integrated_gradients import IntegratedGradients
  import numpy
  from skimage import segmentation
  from skimage.morphology import dilation
  from skimage.morphology import disk
  from skimage.transform import resize
label_desc: Use image node_id 2 for calling the XRAI obj's underlying member method code with example usage: obj._get_integrated_gradients(im, call_model_function, call_model_args, baselines, steps, batch_size) and returns: grads