Find the output index corresponding to given output tensor t. Args: t: the output tensor of this subgraph view. Returns: The index in the self.outputs list. Raises: Error: if t in not an output tensor.
(self, t)
| 568 | return subgraph_id |
| 569 | |
| 570 | def output_index(self, t): |
| 571 | """Find the output index corresponding to given output tensor t. |
| 572 | |
| 573 | Args: |
| 574 | t: the output tensor of this subgraph view. |
| 575 | Returns: |
| 576 | The index in the self.outputs list. |
| 577 | Raises: |
| 578 | Error: if t in not an output tensor. |
| 579 | """ |
| 580 | try: |
| 581 | subgraph_id = self._output_ts.index(t) |
| 582 | except: |
| 583 | raise ValueError("Can't find {} in outputs of subgraph {}.".format( |
| 584 | t.name, self.name)) |
| 585 | return subgraph_id |
| 586 | |
| 587 | def consumers(self): |
| 588 | """Return a Python set of all the consumers of this subgraph view. |
no test coverage detected