class_docstr: Example of using the Keras functional API to define a RNN model.
class_docstr_tok: ["Example","of","using","the","Keras","functional","API","to","define","a","RNN","model","."]
code: def forward_rnn(self, inputs, state, seq_lens):
      model_out, self._value_out, h, c = self.rnn_model(
          [inputs, seq_lens] + state
      )
      return model_out, [h, c]
  
file_path: ray/python/ray/rllib/examples/models/rnn_model.py
imports: import numpy
  from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.models.preprocessors import get_preprocessor
  from ray.rllib.models.tf.recurrent_net import RecurrentNetwork
  from ray.rllib.models.torch.recurrent_net import RecurrentNetwork
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
label_desc: Use image node_id 2 for calling the RNNModel obj's underlying member method code with example usage: obj.forward_rnn(inputs, state, seq_lens) and returns: model_out,  list