class_docstr: Unit tests for clustering lookup algorithms.
class_docstr_tok: ["Unit","tests","for","clustering","lookup","algorithms","."]
docstr: Verifies that the gradients of convolutional layer work as expected.
docstr_tok: ["Verifies","that","the","gradients","of","convolutional","layer","work","as","expected","."]
code: def testConvolutionalClusteringAlgorithmGrad(
      self,
      cluster_gradient_aggregation,
      pulling_indices,
      expected_grad_centroids,
  ):
      """Verifies that the gradients of convolutional layer work as expected."""
  
      clustering_centroids = tf.Variable([0.0, 3.0], dtype=tf.float32)
      weight = tf.constant(
          [[0.1, 0.1, 0.1], [3.0, 3.0, 3.0], [0.2, 0.2, 0.2]]
      )
  
      clustering_algo = clustering_registry.ClusteringAlgorithm(
          clustering_centroids, cluster_gradient_aggregation
      )
      self._check_gradients_clustered_weight(
          clustering_algo,
          weight,
          pulling_indices,
          expected_grad_centroids,
      )
  
imports: from absl.testing import parameterized
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import clusterable_layer
  from tensorflow_model_optimization.python.core.clustering.keras import clustering_registry
  from tensorflow_model_optimization.python.core.clustering.keras.cluster_config import GradientAggregation
label_desc: Use image node_id 5 for calling the ClusteringAlgorithmTest obj's underlying member method code with example usage: obj.testConvolutionalClusteringAlgorithmGrad(cluster_gradient_aggregation, pulling_indices, expected_grad_centroids) without return types