Introduction

Tutorials

Developer guide

API Reference

public ChannelLayerNormparametric type

ChannelLayerNorm(sz::Integer, λ = identity; ϵ = 1f-5)

A variant of LayerNorm where the input is normalised along the channel dimension. The input is expected to have channel dimension with size sz. It also applies a learnable shift and rescaling after the normalization.

Note that this is specifically for inputs with 4 dimensions in the format (H, W, C, N) where H, W are the height and width of the input, C is the number of channels, and N is the batch size.