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

Method input_index

tensorflow/contrib/graph_editor/subgraph.py:553–568  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 3

_transform_sgvMethod · 0.95
ParseTupleNodeMethod · 0.80
ParseTupleTreeMethod · 0.80

Calls 2

indexMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected