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

Function reroute_inputs

tensorflow/contrib/graph_editor/reroute.py:399–416  ·  view source on GitHub ↗

Re-route all the inputs of two subgraphs. Args: sgv0: the first subgraph to have its inputs swapped. This argument is converted to a subgraph using the same rules than the function subgraph.make_view. sgv1: the second subgraph to have its inputs swapped. This argument is

(sgv0, sgv1)

Source from the content-addressed store, hash-verified

397
398
399def reroute_inputs(sgv0, sgv1):
400 """Re-route all the inputs of two subgraphs.
401
402 Args:
403 sgv0: the first subgraph to have its inputs swapped. This argument is
404 converted to a subgraph using the same rules than the function
405 subgraph.make_view.
406 sgv1: the second subgraph to have its inputs swapped. This argument is
407 converted to a subgraph using the same rules than the function
408 subgraph.make_view.
409 Returns:
410 A tuple `(sgv0, sgv1)` of subgraph views with their inputs swapped.
411 Note that the function argument sgv0 and sgv1 are also modified in place.
412 Raises:
413 StandardError: if sgv0 or sgv1 cannot be converted to a SubGraphView using
414 the same rules than the function subgraph.make_view.
415 """
416 return _reroute_sgv_inputs(sgv0, sgv1, _RerouteMode.a2b)
417
418
419def swap_outputs(sgv0, sgv1):

Callers

nothing calls this directly

Calls 1

_reroute_sgv_inputsFunction · 0.85

Tested by

no test coverage detected