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

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.]])
主站蜘蛛池模板: 桃园县| 城口县| 高雄市| 台北县| 砚山县| 车险| 丰城市| 邮箱| 唐海县| 华安县| 汨罗市| 九台市| 金堂县| 太仆寺旗| 榆树市| 化州市| 长顺县| 玉山县| 南部县| 化州市| 商丘市| 镇坪县| 托克托县| 阿勒泰市| 张家界市| 平陆县| 大理市| 保亭| 凌源市| 禹州市| 佛学| 金寨县| 徐州市| 清新县| 永善县| 桂东县| 从江县| 英吉沙县| 曲靖市| 绥江县| 姜堰市|