Skip to content

Commit

Permalink
do not use dropout when eval and infer
Browse files Browse the repository at this point in the history
  • Loading branch information
wb14123 committed Oct 23, 2017
1 parent 9e5c661 commit f9950c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ def seq2seq(in_seq, in_seq_len, target_seq, target_seq_len, vocab_size,
num_units, layers, dropout):
in_shape = tf.shape(in_seq)
batch_size = in_shape[0]
input_keep_prob = 1 - dropout

if target_seq != None:
input_keep_prob = 1 - dropout
else:
input_keep_prob = 1


projection_layer=layers_core.Dense(vocab_size, use_bias=False)
Expand Down

0 comments on commit f9950c2

Please sign in to comment.