code: def test_can_be_saved_within_functional_model(self, build):
      inputs = tf.keras.Input(shape=(5,))
      outputs = gdn.GDN()(inputs)
      model = tf.keras.Model(inputs=inputs, outputs=outputs)
      layer = model.get_layer("gdn")
  
      with self.subTest(name="layer_created_as_expected"):
          self.assertIsInstance(layer, gdn.GDN)
          self.assertIsInstance(layer.alpha_parameter, tf.Tensor)
          self.assertEmpty(layer.alpha_parameter.shape)
          self.assertIsInstance(
              layer.beta_parameter, parameters.GDNParameter
          )
          self.assertIsInstance(
              layer.gamma_parameter, parameters.GDNParameter
          )
          self.assertIsInstance(layer.epsilon_parameter, tf.Tensor)
          self.assertEmpty(layer.epsilon_parameter.shape)
  
      if build:
          x = tf.random.uniform((5, 5), dtype=tf.float32)
          y = model(x)
          weight_names = [w.name for w in model.weights]
  
      tempdir = self.create_tempdir()
      model_path = os.path.join(tempdir, "model")
      # This should force the model to be reconstructed via configs.
      model.save(model_path, save_traces=False)
  
      model = tf.keras.models.load_model(model_path)
  
      layer = model.get_layer("gdn")
      with self.subTest(name="layer_recreated_as_expected"):
          self.assertIsInstance(layer, gdn.GDN)
          self.assertIsInstance(layer.alpha_parameter, tf.Tensor)
          self.assertEmpty(layer.alpha_parameter.shape)
          self.assertIsInstance(
              layer.beta_parameter, parameters.GDNParameter
          )
          self.assertIsInstance(
              layer.gamma_parameter, parameters.GDNParameter
          )
          self.assertIsInstance(layer.epsilon_parameter, tf.Tensor)
          self.assertEmpty(layer.epsilon_parameter.shape)
  
      if build:
          with self.subTest(name="model_outputs_identical"):
              self.assertAllEqual(model(x), y)
  
          with self.subTest(name="model_weights_identical"):
              self.assertSameElements(
                  weight_names, [w.name for w in model.weights]
              )
  
imports: import os
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_compression.python.layers import gdn
  from tensorflow_compression.python.layers import parameters
label_desc: Use image node_id 15 for calling the GDNTest obj's underlying member method code with example usage: obj.test_can_be_saved_within_functional_model(build) without return types