# duplicate the lstm_decode unit (same weights)... do beam searchwith the duplicated lstm ...问题在于,在tensorflow中,lstm变量不是在调用"tf.nn.rnn_cell(...)“期间生成的,而是在展开对rnn_decoder的函数调用期间生成的。我可以将作用域设
= rnn.MultiRNNCell([lstm_cell() for _ in range(n_layers)])当我创建第一个多单元时,函数应该按预期工作with tf.variable_scope('lstm') as scope:现在我想再做一个:
with tf.variable_scope('lstm