class_docstr: A TF1CoreSaliency class that computes XRAI.
docstr: Applies XRAI method on an input image and returns the result saliency heatmap along with other detailed information.
  
  Args:
      x_value: Input ndarray, not batched.
      feed_dict: feed dictionary to pass to the TF session.run() call.
        Defaults to {}.
      baselines: a list of baselines to use for calculating
        Integrated Gradients attribution. Every baseline in
        the list should have the same dimensions as the
        input. If the value is not set then the algorithm
        will make the best effort to select default
        baselines. Defaults to None.
      segments: the list of precalculated image segments that should
        be passed to XRAI. Each element of the list is an
        [N,M] boolean array, where NxM are the image
        dimensions. Each elemeent on the list contains exactly the
        mask that corresponds to one segment. If the value is None,
        Felzenszwalb's segmentation algorithm will be applied.
        Defaults to None.
      base_attribution: an optional pre-calculated base attribution that XRAI
        should use. The shape of the parameter should match
        the shape of `x_value`. If the value is None, the
        method calculates Integrated Gradients attribution and
        uses it.
      batch_size: Maximum number of x inputs (steps along the integration
        path) that are passed to sess.run as a batch.
      extra_parameters: an XRAIParameters object that specifies
        additional parameters for the XRAI saliency
        method. If it is None, an XRAIParameters object
        will be created with default parameters. See
        XRAIParameters for more details.
  
  Raises:
      ValueError: If algorithm type is unknown (not full or fast).
                  If the shape of `base_attribution` dosn't match the shape of
                    `x_value`.
                  If call_model_function cannot return INPUT_OUTPUT_GRADIENTS.
  Returns:
      XRAIOutput: an object that contains the output of the XRAI algorithm.
  TODO(tolgab) Add output_selector functionality from XRAI API doc
docstr_tok: ["Applies","XRAI","method","on","an","input","image","and","returns","the","result","saliency","heatmap","along","with","other","detailed","information",".","Args",":","x_value",":","Input","ndarray",",","not","batched",".","feed_dict",":","feed","dictionary","to","pass","to","the","TF","session.run","(",")","call",".","Defaults","to","{","}",".","baselines",":","a","list","of","baselines","to","use","for","calculating","Integrated","Gradients","attribution",".","Every","baseline","in","the","list","should","have","the","same","dimensions","as","the","input",".","If","the","value","is","not","set","then","the","algorithm","will","make","the","best","effort","to","select","default","baselines",".","Defaults","to","None",".","segments",":","the","list","of","precalculated","image","segments","that","should","be","passed","to","XRAI",".","Each","element","of","the","list","is","an","[","N",",","M","]","boolean","array",",","where","NxM","are","the","image","dimensions",".","Each","elemeent","on","the","list","contains","exactly","the","mask","that","corresponds","to","one","segment",".","If","the","value","is","None",",","Felzenszwalb","'s","segmentation","algorithm","will","be","applied",".","Defaults","to","None",".","base_attribution",":","an","optional","pre-calculated","base","attribution","that","XRAI","should","use",".","The","shape","of","the","parameter","should","match","the","shape","of","`","x_value","`",".","If","the","value","is","None",",","the","method","calculates","Integrated","Gradients","attribution","and","uses","it",".","batch_size",":","Maximum","number","of","x","inputs","(","steps","along","the","integration","path",")","that","are","passed","to","sess.run","as","a","batch",".","extra_parameters",":","an","XRAIParameters","object","that","specifies","additional","parameters","for","the","XRAI","saliency","method",".","If","it","is","None",",","an","XRAIParameters","object","will","be","created","with","default","parameters",".","See","XRAIParameters","for","more","details",".","Raises",":","ValueError",":","If","algorithm","type","is","unknown","(","not","full","or","fast",")",".","If","the","shape","of","`","base_attribution","`","dos","n't","match","the","shape","of","`","x_value","`",".","If","call_model_function","can","not","return","INPUT_OUTPUT_GRADIENTS",".","Returns",":","XRAIOutput",":","an","object","that","contains","the","output","of","the","XRAI","algorithm",".","TODO","(","tolgab",")","Add","output_selector","functionality","from","XRAI","API","doc"]
code: def GetMaskWithDetails(
      self,
      x_value,
      feed_dict=None,
      baselines=None,
      segments=None,
      base_attribution=None,
      batch_size=1,
      extra_parameters=None,
  ):
      """Applies XRAI method on an input image and returns the result saliency heatmap along with other detailed information.
  
      Args:
          x_value: Input ndarray, not batched.
          feed_dict: feed dictionary to pass to the TF session.run() call.
            Defaults to {}.
          baselines: a list of baselines to use for calculating
            Integrated Gradients attribution. Every baseline in
            the list should have the same dimensions as the
            input. If the value is not set then the algorithm
            will make the best effort to select default
            baselines. Defaults to None.
          segments: the list of precalculated image segments that should
            be passed to XRAI. Each element of the list is an
            [N,M] boolean array, where NxM are the image
            dimensions. Each elemeent on the list contains exactly the
            mask that corresponds to one segment. If the value is None,
            Felzenszwalb's segmentation algorithm will be applied.
            Defaults to None.
          base_attribution: an optional pre-calculated base attribution that XRAI
            should use. The shape of the parameter should match
            the shape of `x_value`. If the value is None, the
            method calculates Integrated Gradients attribution and
            uses it.
          batch_size: Maximum number of x inputs (steps along the integration
            path) that are passed to sess.run as a batch.
          extra_parameters: an XRAIParameters object that specifies
            additional parameters for the XRAI saliency
            method. If it is None, an XRAIParameters object
            will be created with default parameters. See
            XRAIParameters for more details.
  
      Raises:
          ValueError: If algorithm type is unknown (not full or fast).
                      If the shape of `base_attribution` dosn't match the shape of
                        `x_value`.
                      If call_model_function cannot return INPUT_OUTPUT_GRADIENTS.
      Returns:
          XRAIOutput: an object that contains the output of the XRAI algorithm.
      TODO(tolgab) Add output_selector functionality from XRAI API doc
      """
      if extra_parameters is None:
          x_steps = XRAIParameters().steps
      else:
          x_steps = extra_parameters.steps
      self.validate_xy_tensor_shape(x_steps, batch_size)
  
      return self.core_instance.GetMaskWithDetails(
          x_value,
          call_model_function=self.call_model_function,
          call_model_args=feed_dict,
          baselines=baselines,
          segments=segments,
          base_attribution=base_attribution,
          batch_size=batch_size,
          extra_parameters=extra_parameters,
      )
  
imports: from .base import TF1CoreSaliency
  from ..core import xrai
label_desc: Use image node_id 3 for calling the XRAI obj's underlying member method code with example usage: obj.GetMaskWithDetails(x_value, feed_dict, baselines, segments, base_attribution, batch_size, extra_parameters) and returns: self