class_docstr: Applies NetVLAD to the input.
  
  This is a fully-differentiable version of "Vector of Locally Aggregated Descriptors" commonly used in image
  retrieval.
  
  See [NetVLAD: CNN architecture for weakly supervised place recognition](https://arxiv.org/abs/1511.07247), and.
  [Towards Learning a Universal Non-Semantic Representation of Speech](https://arxiv.org/abs/2002.12764)
  
  Args:
      num_clusters: The number of clusters to use.
  Input shape:
      3D tensor with shape: `(batch_size, time, feature_dim)`.
  Output shape:
      2D tensor with shape: `(batch_size, feature_dim * num_clusters)`.
docstr: Keras build method.
code: def build(self, input_shape):
      """Keras build method."""
      feature_dim = input_shape[-1]
      if not isinstance(feature_dim, int):
          feature_dim = feature_dim.value
      self.fc = tf.keras.layers.Dense(
          units=self.num_clusters,
          activation=tf.nn.softmax,
          kernel_regularizer=tf.keras.regularizers.l2(1e-5),
      )
      self.cluster_centers = self.add_weight(
          name="cluster_centers",
          shape=(1, feature_dim, self.num_clusters),
          initializer=tf.keras.initializers.TruncatedNormal(
              stddev=1.0 / math.sqrt(feature_dim)
          ),
          trainable=True,
      )
      super(NetVLAD, self).build(input_shape)
  
file_path: addons/tensorflow_addons/layers/netvlad.py
imports: import math
  import tensorflow
  from typeguard import typechecked
label_desc: Use image node_id 2 for calling the NetVLAD obj's underlying member method code with example usage: obj.build(input_shape) without return types