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

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.]])
主站蜘蛛池模板: 永春县| 新乡市| 威海市| 吉水县| 武义县| 南投县| 岑溪市| 杭锦后旗| 新竹县| 分宜县| 页游| 周口市| 湟源县| 合肥市| 常熟市| 湘乡市| 凤庆县| 乳源| 博兴县| 沙河市| 安泽县| 庐江县| 沾化县| 莆田市| 新巴尔虎右旗| 佳木斯市| 元氏县| 曲阳县| 炉霍县| 昭平县| 德兴市| 关岭| 北海市| 龙门县| 苍梧县| 房山区| 南召县| 友谊县| 顺平县| 驻马店市| 调兵山市|