class_docstr: NetVLAD layer implementation.
  
  Args:
      num_clusters (`int`):
          The number of clusters.
      dim (`int`):
          Dimension of descriptors.
      alpha (`float`):
          Parameter of initialization. Larger value is harder assignment.
      normalize_input (`bool`):
          If true, descriptor-wise L2 normalization is applied to input.
class_docstr_tok: ["NetVLAD","layer","implementation",".","Args",":","num_clusters","(","`","int","`",")",":","The","number","of","clusters",".","dim","(","`","int","`",")",":","Dimension","of","descriptors",".","alpha","(","`","float","`",")",":","Parameter","of","initialization",".","Larger","value","is","harder","assignment",".","normalize_input","(","`","bool","`",")",":","If","true",",","descriptor-wise","L2","normalization","is","applied","to","input","."]
code: def __init__(
      self,
      num_clusters: int = 64,
      dim: int = 128,
      alpha: float = 100.0,
      normalize_input: bool = True,
  ):
      super().__init__()
      self.num_clusters = num_clusters
      self.alpha = alpha
      self.normalize_input = normalize_input
      self.conv = nn.Conv2d(
          dim, num_clusters, kernel_size=(1, 1), bias=True
      )
      self.centroids = nn.Parameter(torch.rand(num_clusters, dim))
      self._init_params()
  
file_path: towhee/towhee/models/layers/netvlad.py
imports: import torch
  import torch.nn.functional
  from torch import nn
label_desc: Use image node_id 1 to create a new NetVLAD object from inherited base classes: nn with example: obj = NetVLAD(num_clusters, dim, alpha, normalize_input)