TensorFlow reduce_mean
来源:互联网 发布:二手市场软件有哪些 编辑:程序博客网 时间:2024/04/29 12:48
TensorFlow reduce_mean
flyfish
import numpy as npimport tensorflow as tfx = np.array([[1.,2.,3.],[4.,5.,6.]])sess = tf.Session()mean1 = sess.run(tf.reduce_mean(x))mean2 = sess.run(tf.reduce_mean(x, 0))mean3 = sess.run(tf.reduce_mean(x, 1))print (mean1)print (mean2)print (mean3)sess.close()
结果
3.5
[ 2.5 3.5 4.5]
[ 2. 5.]
mean1=(1+2+3+4+5+6)/ 6
mean2=[(1+4)/2,(2+5)/2,(3+6)/2]
mean3=[(1+2+3)/3,(4+5+6)/3]
0 0
- TensorFlow reduce_mean
- TensorFlow. tf.reduce_mean
- tensorflow tf.reduce_mean
- TensorFlow之函数:reduce_mean() 来自于numpy.mean()
- tensorflow的tf.reduce_mean()函数的使用方法
- tensorflow:tf.reduce_mean()和tf.reduce_sum()
- TensorFlow学习--tf.reduce_mean()
- tensorflow学习之常用函数总结:tensorflow.reduce_mean()函数
- TensorFlow基础1:reduce_sum()函数和reduce_mean()函数
- tensorflow学习之常用函数总结:tensorflow官方例子中的诸如tf.reduce_mean()这类函数
- tensorflow学习之常用函数总结:tensorflow官方例子中的诸如tf.reduce_mean()这类函数
- tf.reduce_mean
- tf.reduce_mean的用法
- tensorflow_api_5:tf.reduce_mean()这类函数
- tf.reduce_mean与tf.reduce_min
- tensorflow
- TensorFlow
- TensorFlow
- 5道贪心算法 + 1道思维 + 1道搜索
- 绿色守护嗜睡模式
- java代码与C和C++代码交互JNI深大云网络
- VS间接引用
- gradle build提示You have not accepted the license agreements of the following SDK components
- TensorFlow reduce_mean
- 人民银行支付系统(CNAPS)和中国银联下面的跨行支付系统是一回事儿吗
- springmvc 集成 swagger
- Scapy 中文文档:一、介绍
- Linux OpenSSL 简单加密与解密字符
- Eclipse / MyEclipse的详细优化配置与背景颜色、代码字体颜色、代码注释、快捷键等详细讲解
- 浅谈对App进行测试的重点
- Mybatis源码导入eclipse
- Xcode清理