Swarm-SLAM  1.0.0
C-SLAM Framework
netvlad.NetVLADLayer Class Reference
Inheritance diagram for netvlad.NetVLADLayer:
[legend]

Public Member Functions

def __init__ (self, num_clusters=64, dim=128, normalize_input=True, vladv2=False)
 
def init_params (self, clsts, traindescs)
 
def forward (self, x)
 

Public Attributes

 num_clusters
 
 dim
 
 alpha
 
 vladv2
 
 normalize_input
 
 conv
 
 centroids
 

Detailed Description

 NetVLAD layer implementation
    based on https://github.com/lyakaap/NetVLAD-pytorch/blob/master/netvlad.py

Definition at line 28 of file netvlad.py.

Constructor & Destructor Documentation

◆ __init__()

def netvlad.NetVLADLayer.__init__ (   self,
  num_clusters = 64,
  dim = 128,
  normalize_input = True,
  vladv2 = False 
)
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.
    vladv2 : bool
        If true, use vladv2 otherwise use vladv1

Definition at line 33 of file netvlad.py.

Member Function Documentation

◆ forward()

def netvlad.NetVLADLayer.forward (   self,
  x 
)
Forward pass through the NetVLAD network

Args:
    x (image): image to match

Returns:
    torch array: Global image descriptor

Definition at line 94 of file netvlad.py.

◆ init_params()

def netvlad.NetVLADLayer.init_params (   self,
  clsts,
  traindescs 
)

Definition at line 63 of file netvlad.py.

Member Data Documentation

◆ alpha

netvlad.NetVLADLayer.alpha

Definition at line 54 of file netvlad.py.

◆ centroids

netvlad.NetVLADLayer.centroids

Definition at line 61 of file netvlad.py.

◆ conv

netvlad.NetVLADLayer.conv

Definition at line 57 of file netvlad.py.

◆ dim

netvlad.NetVLADLayer.dim

Definition at line 53 of file netvlad.py.

◆ normalize_input

netvlad.NetVLADLayer.normalize_input

Definition at line 56 of file netvlad.py.

◆ num_clusters

netvlad.NetVLADLayer.num_clusters

Definition at line 52 of file netvlad.py.

◆ vladv2

netvlad.NetVLADLayer.vladv2

Definition at line 55 of file netvlad.py.


The documentation for this class was generated from the following file: