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)
| 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 |
no outgoing calls