GroupNormalization

class GroupNormalization<T : DType, V>(numGroups: Int, numChannels: Int, eps: Double = 1.0E-5, affine: Boolean = true, val name: String = "GroupNormalization", initGamma: Tensor<T, V>? = null, initBeta: Tensor<T, V>? = null) : Module<T, V> , ModuleParameters<T, V> (source)

GroupNormalization layer - Alternative normalization approach. Normalizes the input by dividing channels into groups and normalizing within each group.

Parameters

numGroups

Number of groups to divide the channels into

numChannels

Number of channels in the input

eps

Small value added to the denominator for numerical stability

affine

Whether to learn affine parameters (gamma and beta)

name

Name of the module

initGamma

Initial gamma (scale) parameter

initBeta

Initial beta (shift) parameter

Constructors

Link copied to clipboard
constructor(numGroups: Int, numChannels: Int, eps: Double = 1.0E-5, affine: Boolean = true, name: String = "GroupNormalization", initGamma: Tensor<T, V>? = null, initBeta: Tensor<T, V>? = null)

Properties

Link copied to clipboard
open override val modules: List<Module<T, V>>
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val params: List<ModuleParameter<T, V>>

Parameters owned by this node (weights, biases, etc.).

Functions

Link copied to clipboard
open override fun forward(input: Tensor<T, V>, ctx: ExecutionContext): Tensor<T, V>