code: def testAppliesQuantizationPostActivation(self):
      layer = self.TestLayer()
      layer.activation = QuantizeAwareActivation(
          activations.get("relu"), self.quantizer, 0, layer
      )
  
      model = keras.Sequential([layer])
  
      x = np.array([-6.0, -3.0, 0.0, 0.05, 0.1, 3.0, 6.0])
      # All negative values are removed due to ReLU. The other expected values
      # are the border values of float buckets when [-6, 6] range is quantized to
      # 256 buckets.
      # Derived using `tf.fake_quant_with_min_max_vars`
      expected_activation = np.array(
          [0.0, 0.0, 0.0, 0.04705906, 0.09411764, 3.011765, 5.9764705]
      )
  
      for weight in layer.weights:
          self.assertIn("post_activation", weight.name)
      self.assertAllClose(
          expected_activation.reshape(7), model.predict(x).reshape(7)
      )
  
file_path: model-optimization/tensorflow_model_optimization/python/core/quantization/keras/quantize_aware_activation_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_aware_activation
  from tensorflow_model_optimization.python.core.quantization.keras import quantizers
  from tensorflow_model_optimization.python.core.quantization.keras import utils
label_desc: Use image node_id 4 for calling the QuantizeAwareQuantizationTest obj's underlying member method code with example usage: obj.testAppliesQuantizationPostActivation() without return types