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

Method _get_tensor_by_tf_output

tensorflow/python/framework/ops.py:3796–3810  ·  view source on GitHub ↗

Returns the `Tensor` representing `tf_output`. Note that there is only one such `Tensor`, i.e. multiple calls to this function with the same TF_Output value will always return the same `Tensor` object. Args: tf_output: A wrapped `TF_Output` (the C API equivalent of `Tensor`).

(self, tf_output)

Source from the content-addressed store, hash-verified

3794 return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
3795
3796 def _get_tensor_by_tf_output(self, tf_output):
3797 """Returns the `Tensor` representing `tf_output`.
3798
3799 Note that there is only one such `Tensor`, i.e. multiple calls to this
3800 function with the same TF_Output value will always return the same `Tensor`
3801 object.
3802
3803 Args:
3804 tf_output: A wrapped `TF_Output` (the C API equivalent of `Tensor`).
3805
3806 Returns:
3807 The `Tensor` that represents `tf_output`.
3808 """
3809 op = self._get_operation_by_tf_operation(tf_output.oper)
3810 return op.outputs[tf_output.index]
3811
3812 def _next_id(self):
3813 """Id for next Operation instance. Also increments the internal id."""

Callers 2

_GatherReturnElementsFunction · 0.80
inputsMethod · 0.80

Calls 1

Tested by

no test coverage detected