gsnn.models.ChannelEMANorm

class gsnn.models.ChannelEMANorm(*args: Any, **kwargs: Any)[source]

Bases: Module

Applies normalization per individual channel using exponential moving averages.

This normalization maintains running statistics for each channel independently but doesn’t use current batch statistics for normalization, making it very stable for small batch sizes.

Parameters:
  • num_channels (int) – Number of channels to normalize.

  • eps (float) – Small value to avoid division by zero. Default: 1e-5

  • momentum (float) – Momentum for updating running statistics. Default: 0.1

  • affine (bool) – If True, applies learnable scale and bias per channel. Default: True

  • track_running_stats (bool) – If True, maintains running statistics. Default: True

__init__(num_channels, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)[source]

Methods

__init__(num_channels[, eps, momentum, ...])

forward(x)

Normalize using per-channel running EMA stats (updated while training).

forward(x)[source]

Normalize using per-channel running EMA stats (updated while training).