Merge pull request #2405 from mozilla/fix-cpu-graph

Set forget_bias=0 in CPU graph for compatibility with CudnnRNN
This commit is contained in:
Reuben Morais 2019-10-08 12:10:51 +02:00 committed by GitHub
commit fe4451f22b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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):
with tfv1.variable_scope('cudnn_lstm/rnn/multi_rnn_cell/cell_0'):
fw_cell = tf.contrib.rnn.LSTMBlockFusedCell(Config.n_cell_dim,
forget_bias=0,
reuse=reuse,
name='cudnn_compatible_lstm_cell')