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

Method _update_input

tensorflow/python/framework/ops.py:2024–2047  ·  view source on GitHub ↗

Update the input to this operation at the given index. NOTE: This is for TF internal use only. Please don't use it. Args: index: the index of the input to update. tensor: the Tensor to be used as the input at the given index. Raises: TypeError: if tensor is not a Ten

(self, index, tensor)

Source from the content-addressed store, hash-verified

2022 device_str)
2023
2024 def _update_input(self, index, tensor):
2025 """Update the input to this operation at the given index.
2026
2027 NOTE: This is for TF internal use only. Please don't use it.
2028
2029 Args:
2030 index: the index of the input to update.
2031 tensor: the Tensor to be used as the input at the given index.
2032
2033 Raises:
2034 TypeError: if tensor is not a Tensor,
2035 or if input tensor type is not convertible to dtype.
2036 ValueError: if the Tensor is from a different graph.
2037 """
2038 if not isinstance(tensor, Tensor):
2039 raise TypeError("tensor must be a Tensor: %s" % tensor)
2040 _assert_same_graph(self, tensor)
2041
2042 # Reset cached inputs.
2043 self._inputs_val = None
2044 c_api.UpdateEdge(
2045 self._graph._c_graph, # pylint: disable=protected-access
2046 tensor._as_tf_output(), # pylint: disable=protected-access
2047 self._tf_input(index))
2048
2049 def _add_while_inputs(self, tensors):
2050 """See AddWhileInputHack in python_api.h.

Callers 15

update_op_inputsFunction · 0.80
_reroute_tFunction · 0.80
_finalize_cyclesMethod · 0.80
RerouteTensorFunction · 0.80
AddOpMethod · 0.80
testLoop_falseMethod · 0.80
testLoop_1Method · 0.80
testLoop_2Method · 0.80
PostProcessingMethod · 0.80
_AddNextAndBackEdgeFunction · 0.80
update_componentFunction · 0.80
_AddOpInternalMethod · 0.80

Calls 4

_tf_inputMethod · 0.95
_assert_same_graphFunction · 0.85
UpdateEdgeMethod · 0.45
_as_tf_outputMethod · 0.45

Tested by 8

testLoop_falseMethod · 0.64
testLoop_1Method · 0.64
testLoop_2Method · 0.64
testUpdateInputMethod · 0.64