class_docstr: <a id="EncoderDecoder"></a>
  
  ## Combined Encoder-Decoder
code: def __init__(
      self,
      encoder: Encoder,
      decoder: Decoder,
      src_embed: nn.Module,
      tgt_embed: nn.Module,
      generator: nn.Module,
  ):
      super().__init__()
      self.encoder = encoder
      self.decoder = decoder
      self.src_embed = src_embed
      self.tgt_embed = tgt_embed
      self.generator = generator
  
      # This was important from their code.
      # Initialize parameters with Glorot / fan_avg.
      for p in self.parameters():
          if p.dim() > 1:
              nn.init.xavier_uniform_(p)
  
imports: import math
  import torch
  import torch.nn
  from labml_nn.utils import clone_module_list
  from .feed_forward import FeedForward
  from .mha import MultiHeadAttention
  from .positional_encoding import get_positional_encoding
label_desc: Use image node_id 1 to create a new EncoderDecoder object from inherited base classes: nn with example: obj = EncoderDecoder(encoder, decoder, src_embed, tgt_embed, generator)