Learn Before
Concept
Encoder Base Interface
In object-oriented implementations of the encoder-decoder architecture, the base encoder acts as an interface rather than a concrete model. It defines the structural blueprint by specifying that the encoder must accept variable-length sequences, denoted as , as its input. This base class does not define the internal computational logic; instead, any specific neural network model (such as a Recurrent Neural Network or a Transformer) that inherits from this base Encoder class is required to provide its own concrete implementation for the forward pass.
0
1
Updated 2026-05-14
Tags
D2L
Dive into Deep Learning @ D2L