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

Function alias_inplace_update

tensorflow/python/ops/inplace_ops.py:71–90  ·  view source on GitHub ↗

Applies an inplace update 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

69 ('Prefer tf.tensor_scatter_nd_update, which offers the same functionality '
70 'with well-defined read-write semantics.'))
71def alias_inplace_update(x, i, v):
72 """Applies an inplace update on input x at index i with value v. Aliases x.
73
74 If i is None, x and v must be the same shape. Computes
75 x = v;
76 If i is a scalar, x has a rank 1 higher than v's. Computes
77 x[i, :] = v;
78 Otherwise, x and v must have the same rank. Computes
79 x[i, :] = v;
80
81 Args:
82 x: A Tensor.
83 i: None, a scalar or a vector.
84 v: A Tensor.
85
86 Returns:
87 Returns x.
88
89 """
90 return _inplace_helper(x, i, v, gen_array_ops.inplace_update)
91
92
93@deprecation.deprecated(

Callers 2

_UpdateFunction · 0.90
inplace_updateFunction · 0.85

Calls 1

_inplace_helperFunction · 0.85

Tested by

no test coverage detected