def hybrid_forward(self, F, inputs, mem_value, mask=None, mem_mask=None):  <EOL>
outputs, attention_in_outputs =self.attention_cell_in(inputs, inputs, inputs, mask)<EOL>outputs = self.proj_in(outputs)<EOL>if self._dropout:<EOL><INDENT>outputs = self.dropout_layer(outputs)<EOL><DEDENT>if self._use_residual:<EOL><INDENT>outputs = outputs + inputs<EOL><DEDENT>outputs = self.layer_norm_in(outputs)<EOL>inputs = outputs<EOL>outputs, attention_inter_outputs =self.attention_cell_inter(inputs, mem_value, mem_value, mem_mask)<EOL>outputs = self.proj_inter(outputs)<EOL>if self._dropout:<EOL><INDENT>outputs = self.dropout_layer(outputs)<EOL><DEDENT>if self._use_residual:<EOL><INDENT>outputs = outputs + inputs<EOL><DEDENT>outputs = self.layer_norm_inter(outputs)<EOL>outputs = self.ffn(outputs)<EOL>additional_outputs = []<EOL>if self._output_attention:<EOL><INDENT>additional_outputs.append(attention_in_outputs)<EOL>additional_outputs.append(attention_inter_outputs)<EOL><DEDENT>return outputs, additional_outputs<EOL>
Transformer Decoder Attention Cell.

        Parameters
        ----------
        inputs : Symbol or NDArray
            Input sequence. Shape (batch_size, length, C_in)
        mem_value : Symbol or NDArrays
            Memory value, i.e. output of the encoder. Shape (batch_size, mem_length, C_in)
        mask : Symbol or NDArray or None
            Mask for inputs. Shape (batch_size, length, length)
        mem_mask : Symbol or NDArray or None
            Mask for mem_value. Shape (batch_size, length, mem_length)

        Returns
        -------
        decoder_cell_outputs: list
            Outputs of the decoder cell. Contains:

            - outputs of the transformer decoder cell. Shape (batch_size, length, C_out)
            - additional_outputs of all the transformer decoder cell