Thank you for sharing the code.
I got the following error when constructing the multilayer LSTM:
InvalidArgumentError: Dimensions must be equal, but are 128 and 65 for 'rnn/while/rnn/multi_rnn_cell/cell_0/lstm_cell/MatMul_1' (op: 'MatMul') with input shapes: [?,128], [65,256].
I am using tensorflow 1.12 on Windows 10.
I believe the issue is on how the multiple LSTM cells are in created. Specifically, this line
multi_layer_cell = tf.nn.rnn_cell.MultiRNNCell([cell] * 2)
likely creates two cell pointing to the same object.
I was able to get rid of this issue by changing it to:
multi_layer_cell = tf.nn.rnn_cell.MultiRNNCell[rnn_cell.LSTMCell(n_hidden, state_is_tuple=True) for _ in range(2)])
hi,
Thank you for sharing the code. I got the following error when constructing the multilayer LSTM:
I am using tensorflow 1.12 on Windows 10.
I believe the issue is on how the multiple LSTM cells are in created. Specifically, this line
multi_layer_cell = tf.nn.rnn_cell.MultiRNNCell([cell] * 2)
likely creates two cell pointing to the same object. I was able to get rid of this issue by changing it to:multi_layer_cell = tf.nn.rnn_cell.MultiRNNCell[rnn_cell.LSTMCell(n_hidden, state_is_tuple=True) for _ in range(2)])