class_docstr: To run: "python -m saliency.tf1.occlusion_test" top-level saliency directory.
class_docstr_tok: ["To","run",":","``","python","-m","saliency.tf1.occlusion_test","''","top-level","saliency","directory","."]
docstr: Tests the Occlusion method using a simple TF1 model.
docstr_tok: ["Tests","the","Occlusion","method","using","a","simple","TF1","model","."]
code: def testOcclsuionGetMask(self):
      """Tests the Occlusion method using a simple TF1 model."""
      expected_calls = (
          10  # 5x5 image with size 3 window, 1 extra call for input
      )
      # Calculate the occlusion attribution of the input.
      mask = self.occlusion_instance.GetMask(
          self.x_input_val, feed_dict=None, size=3, value=0
      )
  
      # Verify the result for completeness..
      # Expected (for max_sigma=10): 1.4746742
      # mask.sum (for max_sigma=10): 1.4742470...
      np.testing.assert_equal(mask, self.expected_val)
      self.assertEqual(self.sess_spy.run.call_count, expected_calls)
  
file_path: saliency/saliency/tf1/occlusion_test.py
imports: import unittest
  import unittest.mock
  from .None import occlusion
  from .None import utils
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the OcclusionTest obj's underlying member method code with example usage: obj.testOcclsuionGetMask() without return types