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)`.
code: def __init__(self, num_clusters: int, **kwargs):
      super().__init__(**kwargs)
      if num_clusters <= 0:
          raise ValueError(
              "`num_clusters` must be greater than 1: %i" % num_clusters
          )
      self.num_clusters = num_clusters
  
file_path: addons/tensorflow_addons/layers/netvlad.py
imports: import math
  import tensorflow
  from typeguard import typechecked
label_desc: Use image node_id 1 to create a new NetVLAD object from inherited base classes: tf.keras.layers with example: obj = NetVLAD(num_clusters)