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

Function detach_control_inputs

tensorflow/contrib/graph_editor/edit.py:38–48  ·  view source on GitHub ↗

Detach all the external control inputs of the subgraph sgv. Args: sgv: the subgraph view to be detached. This argument is converted to a subgraph using the same rules as the function subgraph.make_view.

(sgv)

Source from the content-addressed store, hash-verified

36
37
38def detach_control_inputs(sgv):
39 """Detach all the external control inputs of the subgraph sgv.
40
41 Args:
42 sgv: the subgraph view to be detached. This argument is converted to a
43 subgraph using the same rules as the function subgraph.make_view.
44 """
45 sgv = subgraph.make_view(sgv)
46 for op in sgv.ops:
47 cops = [cop for cop in op.control_inputs if cop not in sgv.ops]
48 reroute.remove_control_inputs(op, cops)
49
50
51def detach_control_outputs(sgv, control_outputs):

Callers 1

detach_inputsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected