1 vin.encoders.fourier

vin.encoders.fourier

Learnable Fourier feature encoders for VIN continuous inputs.

This module provides LearnableFourierFeatures, which maps candidate pose features or normalized voxel XYZ coordinates into a trainable positional embedding. The implementation follows:

*Learnable Fourier Features for Multi-Dimensional Spatial Positional Encoding*
(NeurIPS 2021)

The implementation follows the paper’s formulation (learned projection + sin/cos features + small MLP). For reference, see the public implementation at: https://github.com/JHLew/Learnable-Fourier-Features

1.1 Classes

Name Description
LearnableFourierFeatures Learnable Fourier Features (LFF) positional encoding.
LearnableFourierFeaturesConfig Config-as-factory wrapper for LearnableFourierFeatures.

1.1.1 LearnableFourierFeatures

vin.encoders.fourier.LearnableFourierFeatures(config)

Learnable Fourier Features (LFF) positional encoding.

This module maps continuous inputs \(x \in \mathbb{R}^D\) into a learned feature space by:

  1. learning a projection matrix \(W_r\),
  2. applying sinusoidal features, and
  3. mapping them through a small MLP.

Compared to fixed random Fourier features, the learned projection and the MLP allow the encoding to adapt to the downstream task. This is a learned coordinate-feature inductive bias; the arbitrary projection and MLP do not enforce translation, rotation, or SE(3) equivariance.

1.1.1.1 Attributes

Name Description
out_dim Return the emitted feature dimension, including raw inputs when enabled.

1.1.1.2 Methods

Name Description
forward Encode vectors with learned sinusoidal features.
1.1.1.2.1 forward
vin.encoders.fourier.LearnableFourierFeatures.forward(x)

Encode vectors with learned sinusoidal features.

1.1.1.2.1.1 Parameters
Name Type Description Default
x Tensor Tensor["... D"] input vectors with D == input_dim. required
1.1.1.2.1.2 Returns
Name Type Description
Tensor Tensor["... E"] encoded vectors, optionally concatenated with
Tensor the raw input when LearnableFourierFeaturesConfig.include_input
Tensor is enabled.

1.1.2 LearnableFourierFeaturesConfig

vin.encoders.fourier.LearnableFourierFeaturesConfig()

Config-as-factory wrapper for LearnableFourierFeatures.

1.1.2.1 Attributes

Name Description
target_type Factory target for aria_nbv.configs.base.BaseConfig.setup_target.
out_dim Return the width emitted by this configuration.
input_dim Input dimensionality (default: 6 for SE(3) relative pose as translation + so(3) log).
fourier_dim Fourier feature dimensionality (must be even).
hidden_dim Hidden dimension of the internal MLP.
output_dim Output positional encoding dimensionality (per input vector).
gamma Initialization scale (paper parameter \(\gamma\)).
include_input Concatenate raw inputs to the learned encoding when True.
Back to top