MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / LSTMStateTuple

Class LSTMStateTuple

tensorflow/python/ops/rnn_cell_impl.py:616–632  ·  view source on GitHub ↗

Tuple used by LSTM Cells for `state_size`, `zero_state`, and output state. Stores two elements: `(c, h)`, in that order. Where `c` is the hidden state and `h` is the output. Only used when `state_is_tuple=True`.

Source from the content-addressed store, hash-verified

614
615@tf_export(v1=["nn.rnn_cell.LSTMStateTuple"])
616class LSTMStateTuple(_LSTMStateTuple):
617 """Tuple used by LSTM Cells for `state_size`, `zero_state`, and output state.
618
619 Stores two elements: `(c, h)`, in that order. Where `c` is the hidden state
620 and `h` is the output.
621
622 Only used when `state_is_tuple=True`.
623 """
624 __slots__ = ()
625
626 @property
627 def dtype(self):
628 (c, h) = self
629 if c.dtype != h.dtype:
630 raise TypeError("Inconsistent internal state: %s vs %s" %
631 (str(c.dtype), str(h.dtype)))
632 return c.dtype
633
634
635@tf_export(v1=["nn.rnn_cell.BasicLSTMCell"])

Calls

no outgoing calls