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

Method _as_node_def_input

tensorflow/python/framework/ops.py:667–684  ·  view source on GitHub ↗

Return a value to use for the NodeDef "input" attribute. The returned string can be used in a NodeDef "input" attribute to indicate that the NodeDef uses this Tensor as input. Raises: ValueError: if this Tensor's Operation does not have a name. Returns: a string.

(self)

Source from the content-addressed store, hash-verified

665 # pylint: enable=protected-access
666
667 def _as_node_def_input(self):
668 """Return a value to use for the NodeDef "input" attribute.
669
670 The returned string can be used in a NodeDef "input" attribute
671 to indicate that the NodeDef uses this Tensor as input.
672
673 Raises:
674 ValueError: if this Tensor's Operation does not have a name.
675
676 Returns:
677 a string.
678 """
679 if not self._op.name:
680 raise ValueError("Operation was not named: %s" % self._op)
681 if self._value_index == 0:
682 return self._op.name
683 else:
684 return "%s:%d" % (self._op.name, self._value_index)
685
686 def _as_tf_output(self):
687 # pylint: disable=protected-access

Callers 2

testNoInputsMethod · 0.45
testNodeDefArgsMethod · 0.45

Calls

no outgoing calls

Tested by 2

testNoInputsMethod · 0.36
testNodeDefArgsMethod · 0.36