Return new `LinearOperator` acting like `op1 + op2`. Args: op1: `LinearOperator` op2: `LinearOperator`, with `shape` and `dtype` such that adding to `op1` is allowed. operator_name: `String` name to give to returned `LinearOperator` hints: `_Hints` object. R
(self, op1, op2, operator_name, hints=None)
| 264 | pass |
| 265 | |
| 266 | def add(self, op1, op2, operator_name, hints=None): |
| 267 | """Return new `LinearOperator` acting like `op1 + op2`. |
| 268 | |
| 269 | Args: |
| 270 | op1: `LinearOperator` |
| 271 | op2: `LinearOperator`, with `shape` and `dtype` such that adding to |
| 272 | `op1` is allowed. |
| 273 | operator_name: `String` name to give to returned `LinearOperator` |
| 274 | hints: `_Hints` object. Returned `LinearOperator` will be created with |
| 275 | these hints. |
| 276 | |
| 277 | Returns: |
| 278 | `LinearOperator` |
| 279 | """ |
| 280 | updated_hints = _infer_hints_allowing_override(op1, op2, hints) |
| 281 | |
| 282 | if operator_name is None: |
| 283 | operator_name = "Add/" + op1.name + "__" + op2.name + "/" |
| 284 | |
| 285 | values = op1.graph_parents + op2.graph_parents |
| 286 | scope_name = self.name |
| 287 | if scope_name.startswith("_"): |
| 288 | scope_name = scope_name[1:] |
| 289 | with ops.name_scope(scope_name, values=values): |
| 290 | return self._add(op1, op2, operator_name, updated_hints) |
| 291 | |
| 292 | |
| 293 | class _AddAndReturnScaledIdentity(_Adder): |