從 resource 引用的變量中減去稀疏更新。
用法
tf.raw_ops.ResourceScatterSub(
resource, indices, updates, name=None
)參數
-
resourceTensor類型為resource。應該來自Variable節點。 -
indices一個Tensor。必須是以下類型之一:int32,int64。ref第一維的索引張量。 -
updates一個Tensor。必須是以下類型之一:float32,float64,int32,uint8,int16,int8,complex64,int64,qint8,quint8,qint32,bfloat16,uint16,complex128,half,uint32,uint64。要添加到ref的更新值的張量。 -
name操作的名稱(可選)。
返回
- 創建的操作。
該操作計算
# 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, ...]
正確處理重複條目:如果多個 indices 引用相同的位置,則它們的貢獻相加。
需要 updates.shape = indices.shape + ref.shape[1:] 或 updates.shape = [] 。
相關用法
- Python tf.raw_ops.ResourceScatterNdSub用法及代碼示例
- Python tf.raw_ops.ResourceScatterMul用法及代碼示例
- Python tf.raw_ops.ResourceScatterAdd用法及代碼示例
- Python tf.raw_ops.ResourceScatterMax用法及代碼示例
- Python tf.raw_ops.ResourceScatterMin用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdAdd用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdUpdate用法及代碼示例
- Python tf.raw_ops.ResourceScatterUpdate用法及代碼示例
- Python tf.raw_ops.ResourceScatterDiv用法及代碼示例
- Python tf.raw_ops.ResourceGather用法及代碼示例
- Python tf.raw_ops.Reshape用法及代碼示例
- Python tf.raw_ops.ReadVariableXlaSplitND用法及代碼示例
- Python tf.raw_ops.ReduceJoin用法及代碼示例
- Python tf.raw_ops.Real用法及代碼示例
- Python tf.raw_ops.Relu用法及代碼示例
- Python tf.raw_ops.ReverseV2用法及代碼示例
- Python tf.raw_ops.Reverse用法及代碼示例
- Python tf.raw_ops.RegexFullMatch用法及代碼示例
- Python tf.raw_ops.ReverseSequence用法及代碼示例
- Python tf.raw_ops.RaggedGather用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.ResourceScatterSub。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
