赞
踩
x = tf.constant([[0.3776],
[0.3031],
[0.4818],
[0.3887]])
y=tf.reduce_mean(x) # 1.5
tf.reduce_mean(x, 0) # [1.5, 1.5]
tf.reduce_mean(x, 1) # [1., 2.]
with tf.Session() as sess:
print(sess.run(y))
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。