neuraltrain.models.common.FourierEmb

pydantic model neuraltrain.models.common.FourierEmb[source][source]

Configuration for Fourier positional embedding.

Parameters:
  • n_freqs – Number of frequencies (harmonics) used to encode one dimension.

  • total_dim

    If provided instead of n_freqs, this will be used to compute the number of frequencies following this relationship:

    n_freqs = (total_dim / 2) ** (1 / n_dims)

    If the resulting n_freqs is not an integer an exception will be raised.

  • n_dims – Number of dimensions to embed. This should be 2 for 2D positions (e.g. MNE layouts) or 3 for 3D positions (e.g. MNE montages).

  • margin – How much to extend the range of the embedding to avoid edge effects.

Fields:
field n_freqs: int | None = 12[source]
field total_dim: int | None = None[source]
field n_dims: int = 2[source]
field margin: float = 0.2[source]
build() FourierEmbModel[source][source]