class_docstr: Integration tests for clustering.
docstr: Test End to End clustering for the model with deep layer.
docstr_tok: ["Test","End","to","End","clustering","for","the","model","with","deep","layer","."]
code: def testEndToEndDeepLayer(self):
      """Test End to End clustering for the model with deep layer."""
      internal_model = tf.keras.Sequential(
          [tf.keras.layers.Dense(5, input_shape=(5,))]
      )
      original_model = keras.Sequential(
          [
              internal_model,
              layers.Dense(5),
          ]
      )
  
      def clusters_check(stripped_model):
          # inner dense layer
          weights_as_list = (
              stripped_model.submodules[1]
              .trainable_weights[0]
              .numpy()
              .flatten()
          )
          unique_weights = set(weights_as_list)
          self.assertLessEqual(
              len(unique_weights), self.params["number_of_clusters"]
          )
  
          # outer dense layer
          weights_as_list = (
              stripped_model.submodules[4]
              .trainable_weights[0]
              .numpy()
              .flatten()
          )
          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 16 for calling the ClusterIntegrationTest obj's underlying member method code with example usage: obj.testEndToEndDeepLayer() without return types