Back to Tensorrt

GroupNormalizationPlugin [DEPRECATED]

plugin/groupNormalizationPlugin/README.md

23.083.2 KB
Original Source

GroupNormalizationPlugin [DEPRECATED]

This plugin is deprecated since TensorRT 10.12 and will be removed in a future release. No alternatives are planned to be provided.

Table Of Contents

Description

The GroupNormalizationPlugin implements Group Normalization, which divides channels into groups and computes normalization statistics within each group. This is particularly useful for vision models where batch sizes may be small.

Non-support for Blackwell and later platforms

As of TensorRT 10.7, usage of this plugin is not supported on Blackwell or later platforms. This plugin can be replaced by TensorRT's native INormalizationLayer(C++, Python).

Note: This plugin remains supported on pre-Blackwell platforms.

Structure

The plugin takes three inputs:

  1. Input tensor with shape [N, C, H, W] (batch, channels, height, width), where C must be divisible by num_groups. (See Parameters for more details on num_groups)
  2. Scale parameters (per-channel, shape [C])
  3. Bias parameters (per-channel, shape [C])

It produces one output with the same dimensions as the input. The normalization is computed as:

group_mean = mean(input, group)
group_var = variance(input, group)
output = gamma (input - group_mean) / sqrt(group_var + epsilon) + beta

Key differences from Instance Normalization:

  • Normalizes across channel groups rather than individual channels
  • More stable for small batch sizes
  • Groups channels to capture cross-channel dependencies

Parameters

ParameterTypeDescription
epsilonfloatSmall value added to variance for numerical stability (default: 1e-5)
num_groupsint32Number of groups to split channels into; must evenly divide C

Additional Resources

License

For terms and conditions for use, reproduction, and distribution, see the TensorRT Software License Agreement.

Changelog

  • May 2025: Add deprecation note.

  • Feb 2025: Initial release of this README, Deprecation and non-support notice added.

Known Issues

  • Limited to FP32 precision (native implementation supports mixed precision)
  • No NHWC layout support (native implementation supports multiple layouts)
  • Batch size must be known during network creation