class_docstr: Class responsible for embedding vertex features. Mapping from
  feature space to the embedding space is a tensor of size [K, D], where
      K = number of dimensions in the feature space
      D = number of dimensions in the embedding space
  Vertex features is a tensor of size [N, K], where
      N = number of vertices
      K = number of dimensions in the feature space
  Vertex embeddings are computed as F * E = tensor of size [N, D]
class_docstr_tok: ["Class","responsible","for","embedding","vertex","features",".","Mapping","from","feature","space","to","the","embedding","space","is","a","tensor","of","size","[","K",",","D","]",",","where","K","=","number","of","dimensions","in","the","feature","space","D","=","number","of","dimensions","in","the","embedding","space","Vertex","features","is","a","tensor","of","size","[","N",",","K","]",",","where","N","=","number","of","vertices","K","=","number","of","dimensions","in","the","feature","space","Vertex","embeddings","are","computed","as","F","*","E","=","tensor","of","size","[","N",",","D","]"]
docstr: Initialize embedder, set random embeddings
  
  Args:
      num_vertices (int): number of vertices to embed
      feature_dim (int): number of dimensions in the feature space
      embed_dim (int): number of dimensions in the embedding space
      train_features (bool): determines whether vertex features should
          be trained (default: False)
docstr_tok: ["Initialize","embedder",",","set","random","embeddings","Args",":","num_vertices","(","int",")",":","number","of","vertices","to","embed","feature_dim","(","int",")",":","number","of","dimensions","in","the","feature","space","embed_dim","(","int",")",":","number","of","dimensions","in","the","embedding","space","train_features","(","bool",")",":","determines","whether","vertex","features","should","be","trained","(","default",":","False",")"]
code: def __init__(
      self,
      num_vertices: int,
      feature_dim: int,
      embed_dim: int,
      train_features: bool = False,
  ):
      """
      Initialize embedder, set random embeddings
  
      Args:
          num_vertices (int): number of vertices to embed
          feature_dim (int): number of dimensions in the feature space
          embed_dim (int): number of dimensions in the embedding space
          train_features (bool): determines whether vertex features should
              be trained (default: False)
      """
      super(VertexFeatureEmbedder, self).__init__()
      if train_features:
          self.features = nn.Parameter(
              torch.Tensor(num_vertices, feature_dim)
          )
      else:
          self.register_buffer(
              "features", torch.Tensor(num_vertices, feature_dim)
          )
      self.embeddings = nn.Parameter(
          torch.Tensor(feature_dim, embed_dim)
      )
      self.reset_parameters()
  
file_path: detectron2/projects/DensePose/densepose/modeling/cse/vertex_feature_embedder.py
imports: import pickle
  import torch
  from torch import nn
  from detectron2.utils.file_io import PathManager
  from .utils import normalize_embeddings
label_desc: Use image node_id 1 to create a new VertexFeatureEmbedder object from inherited base classes: nn with example: obj = VertexFeatureEmbedder(num_vertices, feature_dim, embed_dim, train_features)