oa::ml::nn::EncoderDecoder
Ready-to-train encoder-decoder Transformer for sequence-to-sequence tasks. Source and target token/position embeddings feed separate block stacks: encoder blocks run bidirectional self-attention, decoder blocks run causal self-attention and bidirectional cross-attention over the encoder output. forward(source, target) returns all-position target logits.
Declaration
pub struct EncoderDecoder { /* private fields */ }Public Rust declaration.
Public Methods
Associated Functions
Public Method Documentation
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
Construct a deterministic encoder-decoder Transformer. Both stacks use num_layers blocks of the same width recipe. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.
Construct a deterministic encoder-decoder Transformer. Both stacks use num_layers blocks of the same width recipe. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.
Construct a deterministic encoder-decoder Transformer. Both stacks use num_layers blocks of the same width recipe. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.
Construct a deterministic encoder-decoder Transformer. Both stacks use num_layers blocks of the same width recipe. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.
Construct a deterministic encoder-decoder Transformer. Both stacks use num_layers blocks of the same width recipe. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.
Construct a deterministic encoder-decoder Transformer. Both stacks use num_layers blocks of the same width recipe. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.
Construct a deterministic encoder-decoder Transformer. Both stacks use num_layers blocks of the same width recipe. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
Construct a deterministic encoder-decoder Transformer. Both stacks use num_layers blocks of the same width recipe. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.