- 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.]])
推薦閱讀
- 大學計算機信息技術導論
- 火格局的時空變異及其在電網防火中的應用
- PHP開發手冊
- 西門子S7-200 SMART PLC實例指導學與用
- 21天學通Visual Basic
- INSTANT Autodesk Revit 2013 Customization with .NET How-to
- 工業機器人操作與編程
- Grome Terrain Modeling with Ogre3D,UDK,and Unity3D
- 大數據驅動的機械裝備智能運維理論及應用
- TensorFlow Reinforcement Learning Quick Start Guide
- 從零開始學JavaScript
- 21天學通Linux嵌入式開發
- 智慧未來
- Creating ELearning Games with Unity
- 實戰Windows Azure