CrossAttention class
A single head of cross-attention (Encoder-Decoder Attention).
This module allows tokens in the decoder's sequence (queries) to interact with and attend to tokens in the encoder's output sequence (keys and values).
Constructors
- CrossAttention(int decoderEmbedSize, int encoderEmbedSize, int headSize)
Properties
Methods
-
forward(
List< ValueVector> x_decoder, List<ValueVector> x_encoder) → List<ValueVector> - Forward pass for a single cross-attention head.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parameters(
) → List< Value> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
zeroGrad(
) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited