def forward(self, inputs, begin_state=None): 
encoded = self.embedding(inputs)<EOL>if begin_state is None:<EOL><INDENT>begin_state = self.begin_state(batch_size=inputs.shape[<NUM_LIT:1>])<EOL><DEDENT>encoded, state = self.encoder(encoded, begin_state)<EOL>if self._dropout:<EOL><INDENT>encoded = nd.Dropout(encoded, p=self._dropout, axes=(<NUM_LIT:0>,))<EOL><DEDENT>out = self.decoder(encoded)<EOL>return out, state<EOL>
Defines the forward computation. Arguments can be either
        :py:class:`NDArray` or :py:class:`Symbol`.

        Parameters
        -----------
        inputs : NDArray
            input tensor with shape `(sequence_length, batch_size)`
              when `layout` is "TNC".
        begin_state : list
            initial recurrent state tensor with length equals to num_layers-1.
            the initial state with shape `(num_layers, batch_size, num_hidden)`

        Returns
        --------
        out: NDArray
            output tensor with shape `(sequence_length, batch_size, input_size)`
              when `layout` is "TNC".
        out_states: list
            output recurrent state tensor with length equals to num_layers-1.
            the state with shape `(num_layers, batch_size, num_hidden)`