class_docstr: To run: "python -m saliency.core.blur_ig_test" top-level saliency directory.
docstr: Tests that a single BlurIG batch is created and aggregated correctly.
docstr_tok: ["Tests","that","a","single","BlurIG","batch","is","created","and","aggregated","correctly","."]
code: def testBlurIGGetMaskSingleBatch(self):
      """Tests that a single BlurIG batch is created and aggregated correctly."""
      x_steps = 499
      batch_size = 500
      expected_calls = 1  # batch size is 500, ceil(499/500)=1
      # Create a call_model_function using sess and tensors.
      call_model_function = self.create_call_model_function()
  
      # Calculate the Blur IG attribution of the input.
      mask = self.blur_ig_instance.GetMask(
          x_value=self.x_input_val,
          call_model_function=call_model_function,
          call_model_args=None,
          max_sigma=self.max_sigma,
          steps=x_steps,
          batch_size=batch_size,
      )
  
      # 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(call_model_function.num_calls, expected_calls)
  
file_path: saliency/saliency/core/blur_ig_test.py
imports: import unittest
  import unittest.mock
  from .None import blur_ig
  from .base import INPUT_OUTPUT_GRADIENTS
  from .base import SHAPE_ERROR_MESSAGE
  import numpy
label_desc: Use image node_id 6 for calling the BlurIgTest obj's underlying member method code with example usage: obj.testBlurIGGetMaskSingleBatch() without return types