📅  最后修改于: 2022-03-11 14:47:19.152000             🧑  作者: Mango
代码示例1
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])
tf.math.segment_sum(c, tf.constant([0, 0, 1]))
# ==> [[0 0 0 0]
# [5 6 7 8]]