# Module: tf_agents.networks

<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/networks/__init__.py) |

Networks Module.

## Modules

[`actor_distribution_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/actor_distribution_network) module: Sample Keras actor network that generates distributions.

[`actor_distribution_rnn_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/actor_distribution_rnn_network) module: Sample Keras actor network with LSTM cells that generates distributions.

[`categorical_projection_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/categorical_projection_network) module: Project inputs to a categorical distribution object.

[`categorical_q_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/categorical_q_network) module: A Q-network for categorical DQN.

[`encoding_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/encoding_network) module: Keras Encoding Network.

[`expand_dims_layer`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/expand_dims_layer) module: Keras layer performing the equivalent of tf.expand_dims.

[`layer_utils`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/layer_utils) module: Network layer utilities.

[`lstm_encoding_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/lstm_encoding_network) module: Keras LSTM Encoding Network.

[`mask_splitter_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/mask_splitter_network) module: Wrapper network that handles action constraint portion of the observation.

[`nest_map`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/nest_map) module: Network layer that allows mapping multiple inputs.

[`network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/network) module: Base extension to Keras network to simplify copy operations.

[`normal_projection_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/normal_projection_network) module: Project inputs to a normal distribution object.

[`q_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/q_network) module: Sample Keras networks for DQN.

[`q_rnn_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/q_rnn_network) module: Sample recurrent Keras network for DQN.

[`sequential`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/sequential) module: Keras layer to replace the Sequential Model object.

[`utils`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/utils) module: Network utilities.

[`value_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/value_network) module: Sample Keras Value Network.

[`value_rnn_network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/value_rnn_network) module: Sample Keras Value Network with LSTM cells .

## Classes

[`class NestMap`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/NestMap): The `NestMap` network processes nested inputs via nested layers.

[`class Network`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/Network): A class used to represent networks used by TF-Agents policies and agents.

[`class Sequential`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/Sequential): The Sequential Network represents a sequence of Keras layers.

## Functions

[`NestFlatten(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/networks/NestFlatten): Returns a Keras layer that takes a nest of inputs, and returns a list.