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

Method output_index

tensorflow/contrib/graph_editor/subgraph.py:570–585  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 8

_transform_sgvMethod · 0.95
ExecuteChainedFunction · 0.45
GetChainedOpInputsFunction · 0.45
AddRetvalNodesFunction · 0.45
ValidateTensorIdFunction · 0.45
AddPlaceholdersForFeedsFunction · 0.45
PruneGraphDefIntoFunction · 0.45
TensorIdToStringFunction · 0.45

Calls 2

indexMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected