Set forget_bias=0 in CPU graph for compatibility with CudnnRNN

This commit is contained in:
Reuben Morais 2019-10-07 21:06:29 +02:00
parent fb611efd00
commit 5a287a65e5
1 changed files with 1 additions and 0 deletions

View File

@ -82,6 +82,7 @@ def dense(name, x, units, dropout_rate=None, relu=True):
def rnn_impl_lstmblockfusedcell(x, seq_length, previous_state, reuse): def rnn_impl_lstmblockfusedcell(x, seq_length, previous_state, reuse):
with tfv1.variable_scope('cudnn_lstm/rnn/multi_rnn_cell/cell_0'): with tfv1.variable_scope('cudnn_lstm/rnn/multi_rnn_cell/cell_0'):
fw_cell = tf.contrib.rnn.LSTMBlockFusedCell(Config.n_cell_dim, fw_cell = tf.contrib.rnn.LSTMBlockFusedCell(Config.n_cell_dim,
forget_bias=0,
reuse=reuse, reuse=reuse,
name='cudnn_compatible_lstm_cell') name='cudnn_compatible_lstm_cell')