TokenDurationPredictorLayer<T>

Layers ยท AiDotNet.NeuralNetworks.Layers

Predicts one log-duration per token with same-padded temporal convolutions.

Inheritance: LayerBase<T> โ†’ TokenDurationPredictorLayer<T>

Implements: IShapeContract

How It Works

Input is [batch, tokens, encoder features]; output is [batch, tokens, 1]. The caller supplies unpadded sequences and decides whether to detach encoder features. Each block applies a width-three convolution, ReLU, channel LayerNorm, and dropout. The final width-one convolution is a parallel duration head, never a decoder bottleneck.

Constructors

Constructor Summary
TokenDurationPredictorLayer(int encoderDim, int hiddenDim, int numLayers, double dropoutRate) Creates a trainable duration branch whose dimensions are known at construction.

Properties

Property Summary
bool SupportsTraining { get; }

Methods

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