import tensorflow as tf
x = [1.0, 0.5, 0.75, 0.25, 0.2, 0.8, 0.4, 0.6]
dropout = tf.nn.dropout(x, 0.5)
with tf.Session() as sess:
print(sess.run(dropout))
[2. 1. 1.5 0. 0.4 1.6 0.8 0. ]
import tensorflow as tf
x = [1.0, 0.5, 0.75, 0.25, 0.2, 0.8, 0.4, 0.6]
dropout = tf.nn.dropout(x, 0.5)
with tf.Session() as sess:
print(sess.run(dropout))
[2. 1. 1.5 0. 0.4 1.6 0.8 0. ]