class_docstr: To run: "python -m saliency.tf1.blur_ig_test" top-level saliency directory.
class_docstr_tok: ["To","run",":","``","python","-m","saliency.tf1.blur_ig_test","''","top-level","saliency","directory","."]
docstr: Tests that BlurIG steps are created and aggregated correctly.
docstr_tok: ["Tests","that","BlurIG","steps","are","created","and","aggregated","correctly","."]
code: def testBlurIGGetMask(self):
      """Tests that BlurIG steps are created and aggregated correctly."""
      x_steps = 2000
  
      # Calculate the Blur IG attribution of the input.
      mask = self.blur_ig_instance.GetMask(
          self.x_input_val,
          feed_dict=None,
          max_sigma=self.max_sigma,
          steps=x_steps,
      )
  
      # Because the baseline is blurred, all zero values should still have some
      # attribution (introduced noise).
      self.assertEqual(np.count_nonzero(mask), mask.size)
      # Verify the result (for accuracy and therefore completeness).
      np.testing.assert_almost_equal(mask, self.expected_val, decimal=2)
      self.assertEqual(self.sess_spy.run.call_count, x_steps)
  
file_path: saliency/saliency/tf1/blur_ig_test.py
imports: import unittest
  import unittest.mock
  from .None import blur_ig
  import numpy
  from scipy.ndimage import gaussian_filter
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the BlurIgTest obj's underlying member method code with example usage: obj.testBlurIGGetMask() without return types