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

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.]])
主站蜘蛛池模板: 卫辉市| 光泽县| 临洮县| 洮南市| 白水县| 原阳县| 伊金霍洛旗| 清河县| 雅江县| 铁力市| 布拖县| 泗阳县| 河池市| 句容市| 四会市| 明星| 丽水市| 江陵县| 宜良县| 怀来县| 依安县| 马山县| 大石桥市| 高唐县| 盐边县| 拉萨市| 札达县| 酒泉市| 湾仔区| 兴义市| 绵阳市| 惠安县| 常山县| 柳林县| 密山市| 札达县| 周口市| 奎屯市| 惠东县| 丽水市| 隆化县|