我想在两个lstm(或双向-lstm)之间共享权重。说,我定义了2个lstms:
with tf.variable_scope("lstm_1") as _scope:
output_fw, output_state_fw = tf.nn.dynamic_rnn(cell = lstm_cell1,...)
with tf.variable_scope("lstm_2") as _scope:
output_fw, output_state_fw = tf.nn.dynamic_rnn(cell = lstm_cell2,...)
如何在lstm_1
和lstm_2
之间分享权重?如果让lstm_cell1=lstm_cell2
,那该怎么办?如果没有,我该怎么办? THX。