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: