class_docstr: To run: "python -m saliency.tf1.xrai_test" from top-level saliency directory.
class_docstr_tok: ["To","run",":","``","python","-m","saliency.tf1.xrai_test","''","from","top-level","saliency","directory","."]
docstr: Test that the CoreSaliency GetMask method is called correctly.
docstr_tok: ["Test","that","the","CoreSaliency","GetMask","method","is","called","correctly","."]
code: def testXraiGetMaskArgs(self):
      """Test that the CoreSaliency GetMask method is called correctly."""
      self.xrai_instance = xrai.XRAI(
          self.graph, self.sess_spy, self.y, self.x
      )
      x_value = [3, 2, 1]
      feed_dict = {"foo": "bar"}
      baselines = "baz"
      segments = "baq"
      base_attribution = [1, 2, 3]
      batch_size = 9
      extra_parameters = xrai.XRAIParameters(steps=900)
      self.xrai_instance.core_instance.GetMask = mock.MagicMock()
      mock_function = self.xrai_instance.core_instance.GetMask
  
      self.xrai_instance.GetMask(
          x_value=x_value,
          feed_dict=feed_dict,
          baselines=baselines,
          segments=segments,
          base_attribution=base_attribution,
          batch_size=batch_size,
          extra_parameters=extra_parameters,
      )
  
      self.assertEqual(
          mock_function.call_args_list,
          [
              mock.call(
                  x_value,
                  call_model_function=self.xrai_instance.call_model_function,
                  call_model_args=feed_dict,
                  baselines=baselines,
                  segments=segments,
                  base_attribution=base_attribution,
                  batch_size=batch_size,
                  extra_parameters=extra_parameters,
              )
          ],
      )
  
file_path: saliency/saliency/tf1/xrai_test.py
imports: import unittest
  import unittest.mock
  from .None import xrai
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the XRAITest obj's underlying member method code with example usage: obj.testXraiGetMaskArgs() without return types