Applies an inplace sub 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)
| 121 | ('Prefer tf.tensor_scatter_nd_sub, which offers the same functionality ' |
| 122 | 'with well-defined read-write semantics.')) |
| 123 | def alias_inplace_sub(x, i, v): |
| 124 | """Applies an inplace sub on input x at index i with value v. Aliases x. |
| 125 | |
| 126 | If i is None, x and v must be the same shape. Computes |
| 127 | x -= v; |
| 128 | If i is a scalar, x has a rank 1 higher than v's. Computes |
| 129 | x[i, :] -= v; |
| 130 | Otherwise, x and v must have the same rank. Computes |
| 131 | x[i, :] -= v; |
| 132 | |
| 133 | Args: |
| 134 | x: A Tensor. |
| 135 | i: None, a scalar or a vector. |
| 136 | v: A Tensor. |
| 137 | |
| 138 | Returns: |
| 139 | Returns x. |
| 140 | |
| 141 | """ |
| 142 | return _inplace_helper(x, i, v, gen_array_ops.inplace_sub) |
| 143 | |
| 144 | |
| 145 | def empty_like(x, init=None): |
no test coverage detected