AutoregressiveEncoderDecoderLayer<T>
Layers · AiDotNet.NeuralNetworks.Layers
Owns the two execution branches of an autoregressive encoder-decoder architecture.
Inheritance: LayerBase<T> → AutoregressiveEncoderDecoderLayer<T>
Known derived types: TokenConditionedDecoderLayer<T>, VisionEncoderDecoderLayer<T>
How It Works
Keeping the encoder, decoder lookup, cross-attention stack, and output head inside one
composite prevents a sequential model runner from feeding continuous encoder features into
the decoder’s integer lookup table. Registered children retain the standard automatic
parameter, checkpoint, optimizer, training-mode, and gradient-tape behavior from
LayerBase.
Properties
| Property | Summary |
|---|---|
bool SupportsTraining { get; } |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) |
|
Tensor<T> Decode(Tensor<T> encoderMemory, Tensor<T> decoderIds) |
Runs the decoder branch using explicit decoder token IDs. |
Tensor<T> Encode(Tensor<T> input) |
Runs only the encoder branch. |
void ResetState() |