class_docstr: Implementation of recurrent layers.
class_docstr_tok: ["Implementation","of","recurrent","layers","."]
code: def forward(self, inputs, states, sequence_length=None):
      batch_size = inputs.shape[self._layout.find("N")]
  
      for state, info in zip(states, self.state_info(batch_size)):
          if state.shape != info["shape"]:
              raise ValueError(
                  f"Invalid recurrent state shape. Expecting {str(info['shape'])}, got {str(state.shape)}."
              )
      out = self._forward_kernel(inputs, states, sequence_length)
  
      # out is (output, state)
      return out[0] if self.skip_states else out
  
imports: from ...None import np, npx, initializer, cpu
  from ..None import HybridBlock, tensor_types
  from ..parameter import Parameter
  from ...util import use_np
label_desc: Use image node_id 7 for calling the _RNNLayer obj's underlying member method code with example usage: obj.forward(inputs, states, sequence_length) and returns: unknown