I want to build a seq2seq model using object_decoder and use MultiRNNCell with LSTMCell as an encoder. Since the TensorFlow code assumes that "this default behavior (state_is_tuple = False) will soon become obsolete." I set state_is_tuple = True for the encoder.
The problem is that when I pass the encoder state to focus_decoder, it reports an error:
*** AttributeError: 'LSTMStateTuple' object has no attribute 'get_shape'
This problem seems to be related to the attention function () in seq2seq.py and the _linear () function in rnn_cell.py, in which the code calls the get_shape () function of the LSTMStateTuple object from initial_state generated by the encoder.
Although the error disappears when I set state_is_tuple = False for the encoder, the program gives the following warning:
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.LSTMCell object at 0x11763dc50>: Using a concatenated state is slower and will soon be deprecated. Use state_is_tuple=True.
I would really appreciate if anyone could give any instructions on creating seq2seq using RNNCell (state_is_tuple = True).
source
share