MultiOmegaSIRENPositionalEmbeddingND#

class MultiOmegaSIRENPositionalEmbeddingND(
data_dim,
embedding_dim,
L_cache,
omega_0_per_row,
use_bias=True,
)#

Bases: SIRENPositionalEmbeddingND

SIREN positional embedding with a per-row ω₀ in the first layer.

The standard SIRENPositionalEmbeddingND draws every row of the first linear’s weight from Uniform(-2π·ω₀/d, +2π·ω₀/d) using a single scalar ω₀. This variant takes a vector of ω₀ values (one per embedding-dim / row) and re-draws each row independently with its own bound 2π·ω₀_k / d.

This is the “per-row dense” multi-ω₀ init. Every row is independent but downstream MLP layers mix all rows as usual, so at init all output channels see a weighted combination of every ω₀ in the schedule. See BlockDiagonalMultiOmegaSIRENKernelND for a variant that also block-masks the MLP to keep rows disjoint at init.

omega_0#

Mean of the omega_0_per_row schedule; stored for parity with the scalar-omega_0 parent’s diagnostic attribute.

Type:

float

omega_0_per_row#

Non-persistent float32 buffer of shape [embedding_dim] holding the per-row omega_0 values.

Type:

torch.Tensor

linear#

First-layer weight with per-row SIREN init; shape [embedding_dim, data_dim]. Each row k is initialised from U(-2*pi*omega_0_per_row[k]/d, +2*pi*omega_0_per_row[k]/d).

Type:

torch.nn.Linear

grid_cache, step_sizes, L_cache_per_axis, L_cache

Inherited from SIRENPositionalEmbeddingND; see that class.

Parameters:
  • data_dim (int) – Number of spatial/temporal input dimensions.

  • embedding_dim (int) – Dimensionality of the positional embedding.

  • L_cache (int | Sequence[int]) – Cache extent (controls the initial grid cache size).

  • omega_0_per_row (Sequence[float] | Tensor) – Sequence of embedding_dim strictly-positive floats (or a 1-D tensor) giving the omega_0 used for row k of the first linear.

  • use_bias (bool) – Whether to include a bias term.

__init__(
data_dim,
embedding_dim,
L_cache,
omega_0_per_row,
use_bias=True,
)#

Initialize the per-row multi-omega SIREN positional embedding; see the class docstring.

Parameters: