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: 3.6.4        Current pre-release: 3.6.5 (2025/11/28)

Reference
Table of Contents  ▸  List of Commands  ▸  Neural Networks  ▸  nn_normalize◀  nn_nl    |    nn_patchdown2d  ▶

nn_normalize

Arguments:

  • out,in,axes,_normalization_type={ 0:Avg_std | 1:RMS },_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 a 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 | xyz | xyc | xzc | yzc | xyzc }.

For instance :
axes=c means the vector-valued pixels of the input image areis 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.
When different from 0, a group_* argument forces the corresponding complementary axis to be split into N groups.
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.