官术网_书友最值得收藏!

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.]])
主站蜘蛛池模板: 漳平市| 陇西县| 吉首市| 辽宁省| 永登县| 临西县| 内丘县| 汉中市| 柯坪县| 工布江达县| 通渭县| 华阴市| 渑池县| 海城市| 年辖:市辖区| 江津市| 卢湾区| 绥德县| 永济市| 奉贤区| 霍邱县| 东源县| 博乐市| 三门县| 博罗县| 勐海县| 宾阳县| 临清市| 定远县| 三门县| 卢龙县| 宾川县| 界首市| 册亨县| 内黄县| 南部县| 遂川县| 泽普县| 永清县| 来安县| 新邵县|