deprecated keep_prob removed from dropout in tutorials/mnist/mnist_with_summaries.py

This commit is contained in:
Siju Samuel 2019-07-05 09:57:23 +05:30
parent 26ef37bef3
commit 0fe684b5eb

View File

@ -103,7 +103,7 @@ def train():
with tf.name_scope('dropout'):
keep_prob = tf.placeholder(tf.float32)
tf.summary.scalar('dropout_keep_probability', keep_prob)
dropped = tf.nn.dropout(hidden1, keep_prob)
dropped = tf.nn.dropout(hidden1, rate=(1 - keep_prob))
# Do not apply softmax activation yet, see below.
y = nn_layer(dropped, 500, 10, 'layer2', act=tf.identity)