Code:
import tensorflow as tf
from tensorflow.python.ops import rnn_cell
cell = rnn_cell.LSTMCell(64, state_is_tuple=True)
multi_layer_cell = tf.nn.rnn_cell.MultiRNNCell([cell for i in range(2)])
x = tf.placeholder("float", [None, 10, 1])
output, state = tf.nn.dynamic_rnn(multi_layer_cell, x, dtype = tf.float32)
Error:
ValueError: Trying to share variable rnn/multi_rnn_cell/cell_0/lstm_cell/kernel, but specified shape (128, 256) and found shape (65, 256).
Versions: Tensorflow 1.2.1 Python 3.5.4
The variants here don't seem to work: ValueError: Trying to share variable rnn/multi_rnn_cell/cell_0/basic_lstm_cell/kernel