Sine#
- class Sine(*args, **kwargs)#
Bases:
ModuleSine activation function used in SIREN networks.
Computes
sin(x)element-wise. No frequency scaling is applied here; theomega_0/hidden_omega_0factors are absorbed into the weight initialisation (see_init_siren_weights) so that the effective frequency at each layer is determined at init without altering the forward pass arithmetic.This design choice follows the SIREN paper and keeps the forward pass free of any scalar multiplications that might interact poorly with mixed-precision training.
- (none beyond the base nn.Module bookkeeping)