class_docstr: Implementation of a model similar to https://arxiv.org/abs/1802.04200
  
  Paper title: End-to-End Automatic Speech Translation of Audiobooks
  An implementation is available in tensorflow at
  https://github.com/eske/seq2seq
  Relevant files in this implementation are the config
  (https://github.com/eske/seq2seq/blob/master/config/LibriSpeech/AST.yaml)
  and the model code
  (https://github.com/eske/seq2seq/blob/master/translate/models.py).
  The encoder and decoder try to be close to the original implementation.
  The attention is an MLP as in Bahdanau et al.
  (https://arxiv.org/abs/1409.0473).
  There is no state initialization by averaging the encoder outputs.
class_docstr_tok: ["Implementation","of","a","model","similar","to","https",":","\/\/arxiv.org\/abs\/1802.04200","Paper","title",":","End-to-End","Automatic","Speech","Translation","of","Audiobooks","An","implementation","is","available","in","tensorflow","at","https",":","\/\/github.com\/eske\/seq2seq","Relevant","files","in","this","implementation","are","the","config","(","https",":","\/\/github.com\/eske\/seq2seq\/blob\/master\/config\/LibriSpeech\/AST.yaml",")","and","the","model","code","(","https",":","\/\/github.com\/eske\/seq2seq\/blob\/master\/translate\/models.py",")",".","The","encoder","and","decoder","try","to","be","close","to","the","original","implementation",".","The","attention","is","an","MLP","as","in","Bahdanau","et","al",".","(","https",":","\/\/arxiv.org\/abs\/1409.0473",")",".","There","is","no","state","initialization","by","averaging","the","encoder","outputs","."]
code: def __init__(self, encoder, decoder):
      super().__init__(encoder, decoder)
  
imports: from ast import literal_eval
  from typing import List, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import checkpoint_utils, utils
  from fairseq.data.data_utils import lengths_to_padding_mask
  from fairseq.models import FairseqEncoder, FairseqEncoderDecoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture
label_desc: Use image node_id 1 to create a new BerardModel object from inherited base classes: FairseqEncoderDecoderModel with example: obj = BerardModel(encoder, decoder)