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

Method _add_while_inputs

tensorflow/python/framework/ops.py:2049–2072  ·  view source on GitHub ↗

See AddWhileInputHack in python_api.h. NOTE: This is for TF internal use only. Please don't use it. Args: tensors: list of Tensors Raises: TypeError: if tensor is not a Tensor, or if input tensor type is not convertible to dtype. ValueError: if the Tensor is

(self, tensors)

Source from the content-addressed store, hash-verified

2047 self._tf_input(index))
2048
2049 def _add_while_inputs(self, tensors):
2050 """See AddWhileInputHack in python_api.h.
2051
2052 NOTE: This is for TF internal use only. Please don't use it.
2053
2054 Args:
2055 tensors: list of Tensors
2056
2057 Raises:
2058 TypeError: if tensor is not a Tensor,
2059 or if input tensor type is not convertible to dtype.
2060 ValueError: if the Tensor is from a different graph.
2061 """
2062 for tensor in tensors:
2063 if not isinstance(tensor, Tensor):
2064 raise TypeError("tensor must be a Tensor: %s" % tensor)
2065 _assert_same_graph(self, tensor)
2066
2067 # Reset cached inputs.
2068 self._inputs_val = None
2069 c_api.AddWhileInputHack(
2070 self._graph._c_graph, # pylint: disable=protected-access
2071 tensor._as_tf_output(), # pylint: disable=protected-access
2072 self._c_op)
2073
2074 def _add_control_inputs(self, ops):
2075 """Add a list of new control inputs to this operation.

Callers 2

_WhileGradFunction · 0.80
testMethod · 0.80

Calls 3

_assert_same_graphFunction · 0.85
AddWhileInputHackMethod · 0.80
_as_tf_outputMethod · 0.45

Tested by 1

testMethod · 0.64