def __init__(self, opt, dictionary):
    super().__init__()
    self.pad_idx = dictionary[dictionary.null_token]
    self.embeddings = _create_embeddings(dictionary, opt['embedding_size'], self.pad_idx)
    self.encoder = _build_encoder(opt, dictionary, self.embeddings, self.pad_idx, reduction=False)
    self.decoder = _build_decoder(opt, dictionary, self.embeddings, self.pad_idx)
def __init__(self, opt, dictionary):
    super().__init__()
    self.pad_idx = dictionary[dictionary.null_token]
    self.embeddings = _create_embeddings(dictionary, opt['embedding_size'], self.pad_idx)
    self.encoder = _build_encoder(opt, dictionary, self.embeddings, self.pad_idx, reduction=False)
    self.decoder = _build_decoder(opt, dictionary, self.embeddings, self.pad_idx)