Return a Python set of all the consumers of this subgraph view. A consumer of a subgraph view is a tf.Operation which is a consumer of one of the output tensors and is not in the subgraph. Returns: A list of `tf.Operation` which are the consumers of this subgraph view.
(self)
| 585 | return subgraph_id |
| 586 | |
| 587 | def consumers(self): |
| 588 | """Return a Python set of all the consumers of this subgraph view. |
| 589 | |
| 590 | A consumer of a subgraph view is a tf.Operation which is a consumer |
| 591 | of one of the output tensors and is not in the subgraph. |
| 592 | |
| 593 | Returns: |
| 594 | A list of `tf.Operation` which are the consumers of this subgraph view. |
| 595 | """ |
| 596 | ops_set = frozenset(self._ops) |
| 597 | res = [] |
| 598 | for output in self._output_ts: |
| 599 | consumers = [op for op in output.consumers() if op not in ops_set] |
| 600 | util.concatenate_unique(res, consumers) |
| 601 | return res |
| 602 | |
| 603 | |
| 604 | def _check_graph(sgv, graph): |
no outgoing calls