Instance Normalization (IN) Implementation
Initialization, Normalization & Regularization DS practice problem on Onlearn.
Difficulty: medium.
Topics: Understanding Instance Normalization (IN) Implementation, Instance Normalization, Spatial Dimension Reduction, Learnable Affine Parameters, Running Statistics Estimation, Numerical Stability Epsilon, Deep Learning Foundations, Numerical Computing, Computer Vision, Statistical Learning, Tensor Algebra, Normalization Techniques, Neural Network Layers, Array Manipulation, Feature Scaling, Parameter Optimization.
Implement the Instance Normalization operation for 4D tensors (B, C, H, W) using NumPy. For each instance in the batch and each channel, normalize the spatial dimensions (height and width) by subtracting the mean and dividing by the standard deviation, then apply a learned scale (gamma) and shift (beta).