Skip to main content

Module normalize

Module normalize 

Source
Expand description

Channel-wise normalisation for CHW image tensors.

Provides the standard (x - mean) / std transformation used before feeding images to neural networks, applied independently per channel.

Constants§

IMAGENET_MEAN
ImageNet per-channel mean (RGB order, values pre-scaled to [0, 1]).
IMAGENET_STD
ImageNet per-channel standard deviation (RGB order).

Functions§

normalize_chw
Normalize a CHW image channel-wise: output[c, h, w] = (input[c, h, w] - mean[c]) / std[c].