MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / assign_sub

Method assign_sub

tensorflow/python/ops/variables.py:2303–2323  ·  view source on GitHub ↗

Subtracts a value from this variable. This is essentially a shortcut for `assign_sub(self, delta)`. Args: delta: A `Tensor`. The value to subtract from this variable. use_locking: If `True`, use locking during the operation. name: The name of the operation to be created

(self, delta, use_locking=False, name=None, read_value=True)

Source from the content-addressed store, hash-verified

2301 return assign.op
2302
2303 def assign_sub(self, delta, use_locking=False, name=None, read_value=True):
2304 """Subtracts a value from this variable.
2305
2306 This is essentially a shortcut for `assign_sub(self, delta)`.
2307
2308 Args:
2309 delta: A `Tensor`. The value to subtract from this variable.
2310 use_locking: If `True`, use locking during the operation.
2311 name: The name of the operation to be created
2312 read_value: if True, will return something which evaluates to the new
2313 value of the variable; if False will return the assign op.
2314
2315 Returns:
2316 A `Tensor` that will hold the new value of this variable after
2317 the subtraction has completed.
2318 """
2319 assign = state_ops.assign_sub(
2320 self._variable, delta, use_locking=use_locking, name=name)
2321 if read_value:
2322 return assign
2323 return assign.op
2324
2325 def scatter_sub(self, sparse_delta, use_locking=False, name=None):
2326 """Subtracts `tf.IndexedSlices` from this variable.

Callers

nothing calls this directly

Calls 1

assign_subMethod · 0.45

Tested by

no test coverage detected