ConvBatchNormStackLayer<T>

Layers · AiDotNet.NeuralNetworks.Layers

A stack of 1-D convolutions, each followed by batch normalization, an activation and dropout: Tacotron 2’s encoder convolutions and post-net.

Inheritance: LayerBase<T> → ConvBatchNormStackLayer<T>

Implements: IShapeContract

For Beginners

A few convolutions in a row, each looking at five neighbouring frames, with normalization keeping the values in a healthy range.

How It Works

Tacotron 2 (Shen et al. 2018, §2.2–2.3): the encoder’s “3 convolutional layers each containing 512 filters with shape 5 × 1, followed by batch normalization and ReLU activations”, and the post-net’s “5 convolutional layers … 512 filters with shape 5 × 1 with batch normalization, followed by tanh activations on all but the final layer”; dropout 0.5 regularizes convolutional layers. Transformer TTS (Li et al. 2019, §3.3, §3.7) reuses both. Convolutions use “same” padding (odd kernels), so the time axis keeps its length; batch normalization is per channel over batch and time.

Input [time, channels] or [batch, time, channels]; output the same with the last layer’s channels.

Constructors

Constructor Summary
ConvBatchNormStackLayer(int inputChannels, int[] channels, int kernelSize, bool useTanh, bool linearLast, double dropoutRate) Creates the stack.

Properties

Property Summary
bool SupportsTraining { get; }

Methods

Method Summary
IReadOnlyList<ILayer<T>> GetSubLayers()
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank)
void ResetState()