TokenConditionedDecoderLayer<T>

Layers · AiDotNet.NeuralNetworks.Layers

An autoregressive encoder-decoder whose encoder consumes token IDs.

Inheritance: LayerBase<T> → AutoregressiveEncoderDecoderLayer<T> → TokenConditionedDecoderLayer<T>

Implements: IShapeContract

Constructors

Constructor Summary
TokenConditionedDecoderLayer(IEnumerable<ILayer<T>> encoderLayers, EmbeddingLayer<T> decoderEmbedding, IEnumerable<ILayer<T>> decoderLayers, ILayer<T> outputLayer, int encoderVocabularySize, int decoderVocabularySize, int maximumDecoderLength, int maximumEncoderLength) Creates a token-conditioned autoregressive decoder.

Properties

Property Summary
IReadOnlyList<LayerPort> InputPorts { get; } Generated from [TensorPort] declarations.
IReadOnlyList<LayerPort> OutputPorts { get; } Generated from [TensorPort] declarations.

Methods

Method Summary
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank)
LayerInputDomain GetInputDomain(int[] inputShape) Generated from the primary [TensorPort] declaration.
Tensor<T> Forward(Inputs<T> inputs)