首页
Java
登录
6mi
u
盘
搜
搜 索
Java
tensorflow dropout
tensorflow dropout
xiaoxiao
2021-02-28
30
import tensorflow as tf a = tf.constant([[1.,2.,3.],[4.,5.,6.],[7.,8.,9.]]) a = tf.nn.dropout(a,0.5) b = tf.initialize_all_variables() with tf.Session() as sess: sess.run(b) print(sess.run(a))
输出为:
[[ 2. 4. 6.] [ 8. 10. 0.] [ 0. 0. 0.]]
转载请注明原文地址: https://www.6miu.com/read-2625782.html
技术
最新回复
(
0
)