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

Function alias_inplace_add

tensorflow/python/ops/inplace_ops.py:97–116  ·  view source on GitHub ↗

Applies an inplace add on input x at index i with value v. Aliases x. If i is None, x and v must be the same shape. Computes x += v; If i is a scalar, x has a rank 1 higher than v's. Computes x[i, :] += v; Otherwise, x and v must have the same rank. Computes x[i, :] += v; Args:

(x, i, v)

Source from the content-addressed store, hash-verified

95 ('Prefer tf.tensor_scatter_nd_add, which offers the same functionality '
96 'with well-defined read-write semantics.'))
97def alias_inplace_add(x, i, v):
98 """Applies an inplace add on input x at index i with value v. Aliases x.
99
100 If i is None, x and v must be the same shape. Computes
101 x += v;
102 If i is a scalar, x has a rank 1 higher than v's. Computes
103 x[i, :] += v;
104 Otherwise, x and v must have the same rank. Computes
105 x[i, :] += v;
106
107 Args:
108 x: A Tensor.
109 i: None, a scalar or a vector.
110 v: A Tensor.
111
112 Returns:
113 Returns x.
114
115 """
116 return _inplace_helper(x, i, v, gen_array_ops.inplace_add)
117
118
119@deprecation.deprecated(

Callers 1

inplace_addFunction · 0.85

Calls 1

_inplace_helperFunction · 0.85

Tested by

no test coverage detected