class_docstr: Integration tests for clustering.
docstr: Test End to End clustering - functional model.
docstr_tok: ["Test","End","to","End","clustering","-","functional","model","."]
code: def testEndToEndFunctional(self):
      """Test End to End clustering - functional model."""
      inputs = keras.layers.Input(shape=(5,))
      layer1 = keras.layers.Dense(5)(inputs)
      layer2 = keras.layers.Dense(5)(layer1)
      original_model = keras.Model(inputs=inputs, outputs=layer2)
  
      def clusters_check(stripped_model):
          # First dense layer
          weights_as_list = (
              stripped_model.get_weights()[0]
              .reshape(
                  -1,
              )
              .tolist()
          )
          unique_weights = set(weights_as_list)
          self.assertLessEqual(
              len(unique_weights), self.params["number_of_clusters"]
          )
  
      self.end_to_end_testing(original_model, clusters_check)
  
imports: import os
  import tempfile
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import cluster
  from tensorflow_model_optimization.python.core.clustering.keras import cluster_config
  from tensorflow_model_optimization.python.core.clustering.keras.experimental import cluster
label_desc: Use image node_id 15 for calling the ClusterIntegrationTest obj's underlying member method code with example usage: obj.testEndToEndFunctional() without return types