batchNorm

open override fun batchNorm(numFeatures: Int, eps: Double, momentum: Double, affine: Boolean, id: String)(source)

Creates a batch normalization layer for training stability and performance. Normalizes the input across the batch dimension.

Parameters

numFeatures

Number of features (channels)

eps

Small value added to the denominator for numerical stability

momentum

Momentum for running statistics update during training

affine

Whether to learn affine parameters (gamma and beta)

id

Optional identifier for the layer