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 testConvolutionalPerChannelCAGradChannelsFirst(
      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], [4, 5], [6, 7]], dtype=tf.float32
      )
      weight = tf.constant(
          [
              [
                  [[0.1, 1.5], [2.0, 1.1]],
                  [[0.0, 3.5], [4.4, 4.0]],
                  [[4.1, 4.2], [5.3, 6.0]],
                  [[7.0, 7.1], [6.1, 5.8]],
              ]
          ]
      )
  
      clustering_algo = (
          clustering_registry.ClusteringAlgorithmPerChannel(
              clustering_centroids,
              cluster_gradient_aggregation,
              "channels_first",
          )
      )
      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 10 for calling the ClusteringAlgorithmTest obj's underlying member method code with example usage: obj.testConvolutionalPerChannelCAGradChannelsFirst(cluster_gradient_aggregation, pulling_indices, expected_grad_centroids) without return types