GroupedInvertibleConvFlowLayer<T>

Layers · AiDotNet.NeuralNetworks.Layers

Glow-TTS’s invertible 1×1 convolution with channel grouping: the channels are split into groups of nSplit and the same nSplit × nSplit matrix mixes each group.

Inheritance: LayerBase<T> → GroupedInvertibleConvFlowLayer<T>

Implements: IInvertibleFlowStep<T>, IShapeContract

For Beginners

Shuffles information between channels in a way that can be undone exactly.

How It Works

Kim et al. 2020, §3.3, Fig. 8c: a full invertible 1×1 convolution (Glow) over 160 channels costs a 160 × 160 determinant; Glow-TTS instead mixes groups of 4 channels with one shared 4 × 4 matrix, taking two channels from each half so the following coupling layer sees a mix (reference implementation modules.InvConvNear, n_split=4). The matrix starts as a random rotation (QR of a Gaussian matrix, with a positive determinant). The log-determinant is (C / nSplit) · T · log|det W|.

Constructors

Constructor Summary
GroupedInvertibleConvFlowLayer(int channels, int split) Creates the layer.

Properties

Property Summary
bool SupportsTraining { get; }

Methods

Method Summary
Dictionary<string, string> GetParameterRoles() Returns parameter roles for per-role optimizer configuration (e.g., weight decay exemption for biases).
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) Derived from this type’s [TensorLayout] declarations.
IReadOnlyList<Tensor<T>> GetTrainableParameters() Returns all trainable parameter tensors marked with [TrainableParameter].
ValueTuple<Tensor<T>, Tensor<T>> Transform(Tensor<T> input, bool reverse)
void ResetState()
void SetTrainableParameters(IReadOnlyList<Tensor<T>> parameters) Replaces trainable parameter tensors (e.g., with ParameterBuffer views).
void UpdateParameters(T learningRate)
void ZeroGrad() Clears all gradient fields discovered by convention ({paramName}Gradient).