tf.math.reduce_sum( input_tensor, axis=None, keepdims=None, name=None, reduction_indices...例:x = tf.constant([[1, 1, 1], [1, 1, 1]])tf.reduce_sum(x) # 6tf.reduce_sum(x, 0) # [2, 2, 2]tf.reduce_sum...(x, 1) # [3, 3]tf.reduce_sum(x, 1, keepdims=True) # [[3], [3]]tf.reduce_sum(x, [0, 1]) # 6参数:input_tensor...原链接: https://tensorflow.google.cn/versions/r1.14/api_docs/python/tf/math/reduce_sum