将稀疏更新乘以变量引用。
用法
tf.raw_ops.ScatterMul(
ref, indices, updates, use_locking=False, name=None
)参数
-
ref一个可变的Tensor。必须是以下类型之一:float32,float64,int32,uint8,int16,int8,complex64,int64,qint8,quint8,qint32,bfloat16,uint16,complex128,half,uint32,uint64。应该来自Variable节点。 -
indices一个Tensor。必须是以下类型之一:int32,int64。ref第一维的索引张量。 -
updates一个Tensor。必须与ref具有相同的类型。要乘以ref的更新值的张量。 -
use_locking可选的bool。默认为False。如果为 True,则操作将受到锁的保护;否则行为是未定义的,但可能表现出较少的争用。 -
name操作的名称(可选)。
返回
-
一个可变的
Tensor。具有与ref相同的类型。
该操作计算
# Scalar indices
ref[indices, ...] *= updates[...]
# Vector indices (for each i)
ref[indices[i], ...] *= updates[i, ...]
# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] *= updates[i, ..., j, ...]
此操作在更新完成后输出ref。这使得链接需要使用重置值的操作更容易。
正确处理重复条目:如果多个 indices 引用相同的位置,它们的贡献会成倍增加。
需要 updates.shape = indices.shape + ref.shape[1:] 或 updates.shape = [] 。
相关用法
- Python tf.raw_ops.ScatterMin用法及代码示例
- Python tf.raw_ops.ScatterMax用法及代码示例
- Python tf.raw_ops.ScatterUpdate用法及代码示例
- Python tf.raw_ops.ScatterNdUpdate用法及代码示例
- Python tf.raw_ops.ScatterAdd用法及代码示例
- Python tf.raw_ops.ScatterSub用法及代码示例
- Python tf.raw_ops.ScatterDiv用法及代码示例
- Python tf.raw_ops.ScatterNdSub用法及代码示例
- Python tf.raw_ops.ScatterNdNonAliasingAdd用法及代码示例
- Python tf.raw_ops.ScatterNdAdd用法及代码示例
- Python tf.raw_ops.ScatterNd用法及代码示例
- Python tf.raw_ops.SelfAdjointEigV2用法及代码示例
- Python tf.raw_ops.Size用法及代码示例
- Python tf.raw_ops.SparseCrossV2用法及代码示例
- Python tf.raw_ops.Sub用法及代码示例
- Python tf.raw_ops.SparseCross用法及代码示例
- Python tf.raw_ops.SegmentMean用法及代码示例
- Python tf.raw_ops.StringStrip用法及代码示例
- Python tf.raw_ops.SparseConcat用法及代码示例
- Python tf.raw_ops.SparseSegmentSumWithNumSegments用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.raw_ops.ScatterMul。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
