Returns the inputs of op, crossing closure boundaries where necessary. Does not return any captured EagerTensors, i.e., the number of tensors returned may be less than than the actual number of inputs. Args: op: Operation xs_set: ObjectIdentitySet of Tensors we are differentiating w.
(op, xs_set)
| 450 | |
| 451 | |
| 452 | def _NonEagerInputs(op, xs_set): |
| 453 | """Returns the inputs of op, crossing closure boundaries where necessary. |
| 454 | |
| 455 | Does not return any captured EagerTensors, i.e., the number of tensors |
| 456 | returned may be less than than the actual number of inputs. |
| 457 | |
| 458 | Args: |
| 459 | op: Operation |
| 460 | xs_set: ObjectIdentitySet of Tensors we are differentiating w.r.t. |
| 461 | |
| 462 | Returns: |
| 463 | A list of tensors. The tensors may be from multiple Graph/FuncGraphs if op |
| 464 | is in a FuncGraph and has captured inputs. |
| 465 | """ |
| 466 | return [t for t in _Inputs(op, xs_set) if not isinstance(t, ops.EagerTensor)] |
| 467 | |
| 468 | |
| 469 | # TODO(skyewm): plumbing xs through everywhere is ugly, consider making |
no test coverage detected