Embeddings#

Code for embeddings.

class nerfstudio.field_components.embedding.Embedding(in_dim: int, out_dim: int)[source]#

Bases: FieldComponent

Index into embeddings. # TODO: add different types of initializations

Parameters
  • in_dim – Number of embeddings

  • out_dim – Dimension of the embedding vectors

build_nn_modules() None[source]#

Function instantiates any torch.nn members within the module. If none exist, do nothing.

forward(in_tensor: Shaped[Tensor, '*batch input_dim']) Shaped[Tensor, '*batch output_dim'][source]#

Call forward

Parameters

in_tensor – input tensor to process

mean(dim=0)[source]#

Return the mean of the embedding weights along a dim.