def forward(self, inputs, label, begin_state, sampled_values): 
encoded = self.embedding(inputs)<EOL>length = inputs.shape[<NUM_LIT:0>]<EOL>batch_size = inputs.shape[<NUM_LIT:1>]<EOL>encoded, out_states = self.encoder.unroll(length, encoded, begin_state,<EOL>layout='<STR_LIT>', merge_outputs=True)<EOL>out, new_target = self.decoder(encoded, sampled_values, label)<EOL>out = out.reshape((length, batch_size, -<NUM_LIT:1>))<EOL>new_target = new_target.reshape((length, batch_size))<EOL>return out, out_states, new_target<EOL>
Defines the forward computation.

        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*2.
            For each layer the two initial states have shape `(batch_size, num_hidden)`
            and `(batch_size, num_projection)`
        sampled_values : list
            a list of three tensors for `sampled_classes` with shape `(num_samples,)`,
            `expected_count_sampled` with shape `(num_samples,)`, and
            `expected_count_true` with shape `(sequence_length, batch_size)`.

        Returns
        --------
        out : NDArray
            output tensor with shape `(sequence_length, batch_size, 1+num_samples)`
            when `layout` is "TNC".
        out_states : list
            output recurrent state tensor with length equals to num_layers*2.
            For each layer the two initial states have shape `(batch_size, num_hidden)`
            and `(batch_size, num_projection)`
        new_target : NDArray
            output tensor with shape `(sequence_length, batch_size)`
            when `layout` is "TNC".