Add a list of new control inputs to this operation. Args: ops: the list of Operations to add as control input. Raises: TypeError: if ops is not a list of Operations. ValueError: if any op in ops is from a different graph.
(self, ops)
| 2072 | self._c_op) |
| 2073 | |
| 2074 | def _add_control_inputs(self, ops): |
| 2075 | """Add a list of new control inputs to this operation. |
| 2076 | |
| 2077 | Args: |
| 2078 | ops: the list of Operations to add as control input. |
| 2079 | |
| 2080 | Raises: |
| 2081 | TypeError: if ops is not a list of Operations. |
| 2082 | ValueError: if any op in ops is from a different graph. |
| 2083 | """ |
| 2084 | for op in ops: |
| 2085 | if not isinstance(op, Operation): |
| 2086 | raise TypeError("op must be an Operation: %s" % op) |
| 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. |
no outgoing calls