BlockAlignedGaussianModulationND#
- class BlockAlignedGaussianModulationND(
- data_dim,
- num_channels,
- grid_size,
- min_attenuation_at_step=0.1,
- max_attenuation_at_limit=0.95,
- init_extent=1.0,
- parametrization='direct',
Bases:
GaussianModulationNDGaussian modulation with channel-reversed std ordering for block-structured SIRENs.
Motivation#
GaussianModulationNDinitialisesstd_paramso that channel 0 has the narrowest Gaussian (smallestσ, shortest spatial support, broadest spectral support) and the last channel has the widest Gaussian. This ordering is natural when channel index 0 carries high-frequency content, which should be localised in space.Block-structured SIRENs such as
BlockDiagonalMultiOmegaSIRENKernelNDwith a'linear'or'log'frequency schedule assign the lowest \(\omega_0\) (low-frequency content) to the first block. Low frequencies have long spatial support, so the natural alignment is the opposite: widest Gaussian on channel 0 (lowest \(\omega_0\)), narrowest on the last channel (highest \(\omega_0\)).Implementation#
This subclass reverses
std_paramalong the channel axis (dim=-1) immediately after the parent’s__init__. All other behaviour — forward pass, pre-hook clamping, parametrisation, gradient flow — is inherited unchanged fromGaussianModulationND.The channel ordering after reversal:
Channel 0: widest Gaussian (largest
σ), longest spatial support, lowest effective frequency → matched to the lowest-\(\omega_0\) block.Channel
C-1: narrowest Gaussian (smallestσ), shortest spatial support, highest effective frequency → matched to the highest-\(\omega_0\) block.
- param data_dim:
Number of spatial/temporal dimensions.
- param num_channels:
Number of feature channels
Cto modulate.- param grid_size:
Number of grid points per spatial dimension.
- param min_attenuation_at_step:
1D mask value at the first grid step (sets
min_stdclamp bound). Default0.1.- param max_attenuation_at_limit:
1D mask value at the grid boundary (sets
max_stdclamp bound). Default0.95.- param init_extent:
Per-axis bandwidth scale for initialisation (> 0). Default
1.0.- param parametrization:
One of
'direct','log','softplus'. Default'direct'.
- __init__(
- data_dim,
- num_channels,
- grid_size,
- min_attenuation_at_step=0.1,
- max_attenuation_at_limit=0.95,
- init_extent=1.0,
- parametrization='direct',
Initialise the block-aligned Gaussian mask; see the class docstring for argument semantics.