# Module: tf_agents.keras_layers.dynamic_unroll_layer

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/keras_layers/dynamic_unroll_layer.py) |

Tensorflow RL Agent RNN utilities.

This module provides helper functions that Agents can use to train
RNN-based policies.

`DynamicUnroll`

The layer `DynamicUnroll` allows an Agent to train an RNN-based policy
by running an RNN over a batch of episode chunks from a replay buffer.

The agent creates a subclass of `tf.contrib.rnn.LayerRNNCell` or a Keras RNN
cell, such as [`tf.keras.layers.LSTMCell`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/LSTMCell), instances of which
which can themselves be wrappers of `RNNCell`. Training this instance
involes passing it to `DynamicUnroll` constructor; and then pass a set of
episode tensors in the form of `inputs`.

See the unit tests in `rnn_utils_test.py` for more details.

## Classes

[`class DynamicUnroll`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/keras_layers/DynamicUnroll): Process a history of sequences that are concatenated without padding.