(self, dec_inps, enc_out, training=None, mask=None)
return dec_out
Decoder func
Decoder func
Decoder func
def decode(self, dec_inps, enc_out, training=None, mask=None):
    """
    Decoder func
    """
    look_ahead_mask = utils.create_look_ahead_mask(dec_inps)
    mask = (look_ahead_mask, mask)
    dec_emb = self.embed_layer(dec_inps)
    dec_pos_emb = self.pos_embed_layer(dec_inps)
    dec_emb += dec_pos_emb

    dec_inp = dec_emb
    for dec_layer in self.transformer_decs:
      dec_inp = dec_layer([dec_inp, enc_out], training=training, mask=mask)
    dec_out = dec_inp
    return dec_out
def decode ( self , dec_inps , enc_out , training = None , mask = None ) : look_ahead_mask = utils . create_look_ahead_mask ( dec_inps ) mask = ( look_ahead_mask , mask ) dec_emb = self . embed_layer ( dec_inps ) dec_pos_emb = self . pos_embed_layer ( dec_inps ) dec_emb += dec_pos_emb dec_inp = dec_emb for dec_layer in self . transformer_decs : dec_inp = dec_layer ( [ dec_inp , enc_out ] , training = training , mask = mask ) dec_out = dec_inp return dec_out