Explore Library
Code QuizIntermediate

Channel Mean/Std Normalization

A standardization step multiplies by the standard deviation instead of dividing by it.

Codepython
import numpy as np

mean = np.array([0.485, 0.456, 0.406])
std  = np.array([0.229, 0.224, 0.225])

# img already scaled to [0,1], shape (H, W, 3)
img_norm = (img - mean) * std

What is the bug in this per-channel normalization?