def forward(self, src_seq, tgt_seq, src_valid_length=None, tgt_valid_length=None):  
additional_outputs = []<EOL>encoder_outputs, encoder_additional_outputs = self.encode(src_seq,<EOL>valid_length=src_valid_length)<EOL>decoder_states = self.decoder.init_state_from_encoder(encoder_outputs,<EOL>encoder_valid_length=src_valid_length)<EOL>outputs, _, decoder_additional_outputs =self.decode_seq(tgt_seq, decoder_states, tgt_valid_length)<EOL>additional_outputs.append(encoder_additional_outputs)<EOL>additional_outputs.append(decoder_additional_outputs)<EOL>return outputs, additional_outputs<EOL>
Generate the prediction given the src_seq and tgt_seq.

        This is used in training an NMT model.

        Parameters
        ----------
        src_seq : NDArray
        tgt_seq : NDArray
        src_valid_length : NDArray or None
        tgt_valid_length : NDArray or None

        Returns
        -------
        outputs : NDArray
            Shape (batch_size, tgt_length, tgt_word_num)
        additional_outputs : list of list
            Additional outputs of encoder and decoder, e.g, the attention weights