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 works.
docstr_tok: ["Verifies","that","the","gradients","of","convolutional","layer","works","."]
code: def testConvolutionalPerChannelCAGradChannelsLast(
      self,
      cluster_gradient_aggregation,
      pulling_indices,
      expected_grad_centroids,
  ):
      """Verifies that the gradients of convolutional layer works."""
  
      clustering_centroids = tf.Variable(
          [[1, 2], [3, 4], [5, 6]], dtype=tf.float32
      )
      weight = tf.constant(
          [
              [[[1.1, 3.2, 5.2]], [[2.0, 4.1, 5.2]]],
              [[[2.1, 2.0, 6.1]], [[1.0, 5.0, 5.0]]],
          ]
      )
  
      clustering_algo = (
          clustering_registry.ClusteringAlgorithmPerChannel(
              clustering_centroids,
              cluster_gradient_aggregation,
              "channels_last",
          )
      )
      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 9 for calling the ClusteringAlgorithmTest obj's underlying member method code with example usage: obj.testConvolutionalPerChannelCAGradChannelsLast(cluster_gradient_aggregation, pulling_indices, expected_grad_centroids) without return types