Commit 82791fc1 authored by Yunfeng Wang's avatar Yunfeng Wang Committed by QuanluZhang
Browse files

fix dropout_rate's range (#855)

dropout_rate should be in range [0, 1]
parent d7ffef29
...@@ -92,7 +92,7 @@ with tf.Session() as sess: ...@@ -92,7 +92,7 @@ with tf.Session() as sess:
batch_size = 128 batch_size = 128
for i in range(10000): for i in range(10000):
batch = mnist.train.next_batch(batch_size) batch = mnist.train.next_batch(batch_size)
+ """@nni.variable(nni.choice(1, 5), name=dropout_rate)""" + """@nni.variable(nni.choice(0.1, 0.5), name=dropout_rate)"""
dropout_rate = 0.5 dropout_rate = 0.5
mnist_network.train_step.run(feed_dict={mnist_network.images: batch[0], mnist_network.train_step.run(feed_dict={mnist_network.images: batch[0],
mnist_network.labels: batch[1], mnist_network.labels: batch[1],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment