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

Method _add_control_input

tensorflow/python/framework/ops.py:2089–2101  ·  view source on GitHub ↗

Add a new control input to this operation. Args: op: the Operation to add as control input. Raises: TypeError: if op is not an Operation. ValueError: if op is from a different graph.

(self, op)

Source from the content-addressed store, hash-verified

2087 c_api.AddControlInput(self._graph._c_graph, self._c_op, op._c_op) # pylint: disable=protected-access
2088
2089 def _add_control_input(self, op):
2090 """Add a new control input to this operation.
2091
2092 Args:
2093 op: the Operation to add as control input.
2094
2095 Raises:
2096 TypeError: if op is not an Operation.
2097 ValueError: if op is from a different graph.
2098 """
2099 if not isinstance(op, Operation):
2100 raise TypeError("op must be an Operation: %s" % op)
2101 c_api.AddControlInput(self._graph._c_graph, self._c_op, op._c_op) # pylint: disable=protected-access
2102
2103 def _remove_all_control_inputs(self):
2104 """Removes any control inputs to this operation."""

Callers 15

AddOpMethod · 0.80
_trace_executionMethod · 0.80
forward_syncMethod · 0.80
grad_syncMethod · 0.80
AddForwardAccumulatorMethod · 0.80
_AddOpInternalMethod · 0.80
_AddOpInternalMethod · 0.80
AddForwardLoopCounterMethod · 0.80
_BuildLoopMethod · 0.80

Calls

no outgoing calls

Tested by 3

testAddControlInputMethod · 0.64
testControlInputCycleMethod · 0.64
testMethod · 0.64