- TensorFlow 2.0 Quick Start Guide
- Tony Holdroyd
- 120字
- 2021-06-24 16:02:05
Finding a mean
The following is the signature of tf.reduce_mean().
Note that, in what follows, all TensorFlow operations have a name argument that can safely be left to the default of None when using eager execution as its purpose is to identify the operation in a computational graph.
Note that this is equivalent to np.mean, except that it infers the return datatype from the input tensor, whereas np.mean allows you to specify the output type (defaulting to float64):
tf.reduce_mean(input_tensor, axis=None, keepdims=None, name=None)
It is frequently necessary to find the mean value of a tensor. When this is done across a single axis, this axis is said to be reduced.
Here are some examples:
numbers = tf.constant([[4., 5.], [7., 3.]])
推薦閱讀
- 機器學習及應用(在線實驗+在線自測)
- OpenStack for Architects
- 程序設計語言與編譯
- Windows 8應用開發實戰
- 讓每張照片都成為佳作的Photoshop后期技法
- 悟透AutoCAD 2009完全自學手冊
- Learning Azure Cosmos DB
- Deep Reinforcement Learning Hands-On
- 和機器人一起進化
- 寒江獨釣:Windows內核安全編程
- 數字多媒體技術基礎
- Machine Learning with Spark(Second Edition)
- Effective Business Intelligence with QuickSight
- Embedded Linux Development using Yocto Projects(Second Edition)
- Machine Learning in Java