Skip to main content

Module instancenorm

Module instancenorm 

Source
Expand description

InstanceNorm Triton kernels.

InstanceNorm normalises over the spatial dimensions (L) independently per sample (n) and per channel (c):

y[n,c,l] = (x[n,c,l] - mean[n,c]) / sqrt(var[n,c] + eps) * γ[c] + β[c]

Input shape: [N, C, L] — N batch, C channels, L spatial elements. Grid: [N * C] — one CTA per (sample, channel) pair. The CTA index encodes the pair as cta = n * C + c.

Structs§

InstanceNormBackward
InstanceNorm backward pass.
InstanceNormForward
InstanceNorm training forward — saves per-(n,c) mean and rstd.
InstanceNormForwardInference
InstanceNorm forward (inference — no running stats).

Functions§

instance_norm_backward
InstanceNorm backward pass.
instance_norm_forward
InstanceNorm training forward — saves per-(n,c) mean and rstd.
instance_norm_forward_inference
InstanceNorm forward (inference — no running stats).