美文网首页
math_ops.reduce_sum()函数

math_ops.reduce_sum()函数

作者: 是neinei啊 | 来源:发表于2017-12-08 15:47 被阅读118次

tf.reduce_sum(input_tensor, reduction_indices=None, keep_dims=False, name=None)
计算tensor命令某个维度的值的和

举个🌰栗子:

For example:

# 'x' is [[1, 1, 1]]
#         [1, 1, 1]]
tf.reduce_sum(x) ==> 6
tf.reduce_sum(x, 0) ==> [2, 2, 2]
tf.reduce_sum(x, 1) ==> [3, 3]
tf.reduce_sum(x, 1, keep_dims=True) ==> [[3], [3]]
tf.reduce_sum(x, [0, 1]) ==> 6

参数:
input_tensor: 需要reduce的tensor.
reduction_indices: reduce的维度.如果缺省,默认all.
keep_dims: If true, retains reduced dimensions with length 1.
name: A name for the operation (optional).
返回值:
the reduced tensor.

相关文章

  • math_ops.reduce_sum()函数

    tf.reduce_sum(input_tensor, reduction_indices=None, keep_...

  • Excel(三)

    AND函数 OR函数 NOT函数 IF函数 频率分析函数FREQUENCY

  • if、else if、for、while、repeat函数

    ①if函数 ②else if函数 ③for函数 ④while函数 ⑤repeat函数

  • strsplit、mapply、paste、match函数

    strsplit函数 mapply函数 strsplit函数 mapply函数 paste函数 match函数 第...

  • Oracle中常用函数(SQL)

    Oracle函授有以下几个分类:数字函数、字符函数、日期函数、转换函数、集合函数、分析函数 数字函数: 字符函数:...

  • MySQL函数

    字符函数 数字运算函数 比较运算符和函数 日期时间函数 信息函数 聚合函数 加密函数 流程函数

  • BI-SQL丨AND & OR & IN

    AND函数 & OR函数 & IN函数 AND函数、OR函数和IN函数都可以理解是WHERE函数的补充,当然也可以...

  • Python之函数

    课程大纲 函数定义 函数的参数 函数的返回值 高阶函数 函数作用域 递归函数 匿名函数 内置函数 函数式编程 将函...

  • 函数基本知识

    函数 函数的定义: def 函数名() 函数的调用:函数名() #不能将函数调用放在函数定义上方 函数的文档注...

  • 积分表——不定期更新

    基本初等函数包括: 常函数: 幂函数 指数函数 对数函数 三角函数 反三角函数 I、反函数Ⅱ、复合函数:初等函数(...

网友评论

      本文标题:math_ops.reduce_sum()函数

      本文链接:https://www.haomeiwen.com/subject/ohieixtx.html