G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Banner Institutions GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 4.0.6 (2026/10/14)

Reference
Table of Contents  ▸  List of Commands  ▸  Neural Networks  ▸  nn_normalize◀  nn_norm    |    nn_parameters  ▶

nn_normalize

Arguments:

  • out,in,axes,_normalization_type,_group_x>=0,_group_y>=0,_group_z>=0,_group_c>=0,_learning_mode

Description:

Add a normalize layer to the current network.

This normalization layer is generic and can simulate the behavior of a LayerNorm, an InstanceNorm, a GroupNorm, or an RMSNorm.
axes defines the shape used to compute the mean/std of the normalization.
axes can be { x | y | z | c | xy | xz | xc | yz | yc | zc | xyz | xyc | xzc | yzc | xyzc }.

For instance:
axes=c means the vector-valued pixels of the input image are normalized independently, according to the channel values.
axes=xyz means each input channel of the input image is normalized independently, according to all (x,y,z) pixel values.

normalization_type can be { 0:Avg_std | 1:RMS | 2:Affine | 3:Linear } :
0: Normalization by mean/std, followed by the affine transform gamma*x + beta.
1: RMS normalization, followed by the linear transform gamma*x.
2: No normalization, only the affine transform gamma*x + beta is applied.
3: No normalization, only the linear transform gamma*x is applied.
For types 2 and 3, axes (and group_*) only define along which dimensions the gamma (and beta) parameters are shared.

When different from 0, a group_* argument forces the corresponding complementary axis to be split into N groups. N must divide the corresponding input dimension, and a group_* argument cannot be set for an axis that is already listed in axes.
learning_mode can be { 0:No learning | 1:Gamma only | 2:Beta only | 3:Gamma+beta }

Default values:

normalization_type=0, group_x=group_y=group_z=group_c=0 and learning_mode=3.

G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.