tf.compat.v1.nn.rnn_cell.LSTMCell

Long short-term memory unit (LSTM) recurrent network cell.

Inherits From: RNNCell, Layer, Layer, Module

The default non-peephole implementation is based on (Gers et al., 1999). The peephole implementation is based on (Sak et al., 2014).

The class uses optional peep-hole connections, optional cell clipping, and an optional projection layer.

Note that this cell is not optimized for performance. Please use tf.contrib.cudnn_rnn.CudnnLSTM for better performance on GPU, or tf.contrib.rnn.LSTMBlockCell and tf.contrib.rnn.LSTMBlockFusedCell for better performance on CPU. References: Long short-term memory recurrent neural network architectures for large scale acoustic modeling: Sak et al., 2014 (pdf) Learning to forget: Gers et al., 1999 (pdf) Long Short-Term Memory: Hochreiter et al., 1997 (pdf)

num_units int, The number of units in the LSTM cell.
use_peepholes bool, set True to enable diagonal/peephole connections.
cell_clip (optional) A float value, if provided the cell state is clipped by this value prior to the cell output activation.
initializer (optional) The initializer to use for the weight and projection matrices.
num_proj (optional) int, The output dimensionality for the projection matrices. If None, no projection is performed.
proj_clip (optional) A float value. If num_proj > 0 and proj_clip is provided, then the projected values are clipped elementwise to within [-proj_clip, proj_clip].
num_unit_shards Deprecated, will be removed by Jan. 2017. Use a variable_scope partitione