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

Method write

tensorflow/python/ops/tensor_array_ops.py:262–277  ·  view source on GitHub ↗

See TensorArray.

(self, index, value, name=None)

Source from the content-addressed store, hash-verified

260
261 @tf_should_use.should_use_result
262 def write(self, index, value, name=None):
263 """See TensorArray."""
264 with ops.name_scope(name, "TensorArrayWrite", [self._handle, index, value]):
265 # TODO(b/129870929): Fix after all callers provide proper init dtype.
266 value = ops.convert_to_tensor(
267 value, preferred_dtype=self._dtype, name="value")
268 _check_dtypes(value, self._dtype)
269 self._check_element_shape(value.shape)
270 with self._maybe_colocate_with(value):
271 flow_out = gen_data_flow_ops.tensor_array_write_v3(
272 handle=self._handle,
273 index=index,
274 value=value,
275 flow_in=self._flow,
276 name=name)
277 return build_ta_with_new_flow(self, flow_out)
278
279 def stack(self, name=None):
280 """See TensorArray."""

Callers

nothing calls this directly

Calls 5

_check_element_shapeMethod · 0.95
_maybe_colocate_withMethod · 0.95
_check_dtypesFunction · 0.85
build_ta_with_new_flowFunction · 0.85
name_scopeMethod · 0.45

Tested by

no test coverage detected