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

Function _NonEagerInputs

tensorflow/python/ops/gradients_util.py:452–466  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

450
451
452def _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

Callers 4

_PendingCountFunction · 0.85
_StopOpsFunction · 0.85

Calls 1

_InputsFunction · 0.85

Tested by

no test coverage detected