Find the input index corresponding to the given input tensor t. Args: t: the input tensor of this subgraph view. Returns: The index in the self.inputs list. Raises: Error: if t in not an input tensor.
(self, t)
| 551 | pass |
| 552 | |
| 553 | def input_index(self, t): |
| 554 | """Find the input index corresponding to the given input tensor t. |
| 555 | |
| 556 | Args: |
| 557 | t: the input tensor of this subgraph view. |
| 558 | Returns: |
| 559 | The index in the self.inputs list. |
| 560 | Raises: |
| 561 | Error: if t in not an input tensor. |
| 562 | """ |
| 563 | try: |
| 564 | subgraph_id = self._input_ts.index(t) |
| 565 | except: |
| 566 | raise ValueError("Can't find {} in inputs of subgraph {}.".format( |
| 567 | t.name, self.name)) |
| 568 | return subgraph_id |
| 569 | |
| 570 | def output_index(self, t): |
| 571 | """Find the output index corresponding to given output tensor t. |
no test coverage detected