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

Method scatter

tensorflow/python/ops/tensor_array_ops.py:323–340  ·  view source on GitHub ↗

See TensorArray.

(self, indices, value, name=None)

Source from the content-addressed store, hash-verified

321
322 @tf_should_use.should_use_result
323 def scatter(self, indices, value, name=None):
324 """See TensorArray."""
325 with ops.name_scope(name, "TensorArrayScatter",
326 [self._handle, value, indices]):
327 # TODO(b/129870929): Fix after all callers provide proper init dtype.
328 value = ops.convert_to_tensor(
329 value, preferred_dtype=self._dtype, name="value")
330 _check_dtypes(value, self._dtype)
331 if not context.executing_eagerly():
332 self._check_element_shape(value.shape[1:])
333 with self._maybe_colocate_with(value):
334 flow_out = gen_data_flow_ops.tensor_array_scatter_v3(
335 handle=self._handle,
336 indices=indices,
337 value=value,
338 flow_in=self._flow,
339 name=name)
340 return build_ta_with_new_flow(self, flow_out)
341
342 @tf_should_use.should_use_result
343 def split(self, value, lengths, name=None):

Callers 1

unstackMethod · 0.95

Calls 6

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

Tested by

no test coverage detected