W3cubDocs

/TensorFlow 1.15

tf.keras.layers.StackedRNNCells

View source on GitHub

Wrapper allowing a stack of RNN cells to behave as a single cell.

Inherits From: Layer

Used to implement efficient stacked RNNs.

Arguments
cells List of RNN cell instances.

Examples:

cells = [
    keras.layers.LSTMCell(output_dim),
    keras.layers.LSTMCell(output_dim),
    keras.layers.LSTMCell(output_dim),
]

inputs = keras.Input((timesteps, input_dim))
x = keras.layers.RNN(cells)(inputs)
Attributes
output_size
state_size

Methods

get_initial_state

View source

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/layers/StackedRNNCells