计算沿张量段的乘积。
用法
tf.math.segment_prod(
    data, segment_ids, name=None
)参数
- 
data一个Tensor。必须是以下类型之一:float32,float64,int32,uint8,int16,int8,complex64,int64,qint8,quint8,qint32,bfloat16,uint16,complex128,half,uint32,uint64。
- 
segment_ids一个Tensor。必须是以下类型之一:int32、int64。一维张量,其大小等于data的第一个维度的大小。值应该排序并且可以重复。
- 
name操作的名称(可选)。
返回
- 
一个Tensor。具有与data相同的类型。
阅读the section on segmentation 以了解段的解释。
计算一个张量,使得  的乘积超过 j 使得 segment_ids[j] == i 。
如果产品对于给定的细分 ID i , output[i] = 1 是空的。
 
例如:
c = tf.constant([[1,2,3,4], [4, 3, 2, 1], [5,6,7,8]])
tf.segment_prod(c, tf.constant([0, 0, 1]))
# ==> [[4, 6, 6, 4],
#      [5, 6, 7, 8]]相关用法
- Python tf.math.segment_mean用法及代码示例
- Python tf.math.segment_max用法及代码示例
- Python tf.math.segment_sum用法及代码示例
- Python tf.math.segment_min用法及代码示例
- Python tf.math.special.fresnel_cos用法及代码示例
- Python tf.math.special.bessel_k0e用法及代码示例
- Python tf.math.special.bessel_j0用法及代码示例
- Python tf.math.scalar_mul用法及代码示例
- Python tf.math.special.fresnel_sin用法及代码示例
- Python tf.math.sigmoid用法及代码示例
- Python tf.math.special.bessel_j1用法及代码示例
- Python tf.math.sinh用法及代码示例
- Python tf.math.sign用法及代码示例
- Python tf.math.sin用法及代码示例
- Python tf.math.special.bessel_y0用法及代码示例
- Python tf.math.special.bessel_k1用法及代码示例
- Python tf.math.softplus用法及代码示例
- Python tf.math.special.bessel_k1e用法及代码示例
- Python tf.math.square用法及代码示例
- Python tf.math.subtract用法及代码示例
- Python tf.math.special.bessel_k0用法及代码示例
- Python tf.math.special.spence用法及代码示例
- Python tf.math.special.dawsn用法及代码示例
- Python tf.math.special.expint用法及代码示例
- Python tf.math.special.bessel_y1用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.math.segment_prod。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
