I'm trying to figure out the structure of tensorflow code (r0.11) and have problems understanding the "state_is_tuple" parameter used in RNNs (currently looking at LSTMs).
In this post How do I set TensorFlow RNN state when state_is_tuple=True? it is said that the state_is_tuple option sets wether the state of the hidden neurons and the cell state are saved in a tuple or not.
So my questions are: Why does this parameter exist? What is it used for and why should I bother? In what cases should I set it to True/False?
Thanks for helping!
This is a change to an earlier implementation of the rnn_cell-class in which state was a concatenation of the hidden neurons and the cell state. In I think Release 0.11 this was changed to a preferred version of (hidden neurons, cell state), thus as a tuple.
In the future the old concatenation way will be deprecated. Until then default is concatenation, but if you already use the tuple way then state_is_tuple needs to be set to true.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With