错误一
ValueError: Initializer for variable rnn/basic_rnn_cell/kernel/ is from inside a control-flow construct, such as a loop or conditional. When creating a variable inside a loop or conditional, use a lambda as the initializer.
X = np.random.randn(2, 2, 1)
# 第二个example长度为1
X[1,1:] = 0
X_lengths = [2, 1]
cell = tf.nn.rnn_cell.BasicRNNCell