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

Method split

tensorflow/python/ops/tensor_array_ops.py:343–363  ·  view source on GitHub ↗

See TensorArray.

(self, value, lengths, name=None)

Source from the content-addressed store, hash-verified

341
342 @tf_should_use.should_use_result
343 def split(self, value, lengths, name=None):
344 """See TensorArray."""
345 with ops.name_scope(name, "TensorArraySplit",
346 [self._handle, value, lengths]):
347 value = ops.convert_to_tensor(value, dtype=self._dtype, name="value")
348 with self._maybe_colocate_with(value):
349 lengths_64 = math_ops.cast(lengths, dtypes.int64)
350 if not context.executing_eagerly():
351 clengths = tensor_util.constant_value(lengths_64)
352 if value.shape.dims is not None and clengths is not None:
353 if clengths.shape and clengths.max() == clengths.min():
354 self._check_element_shape(
355 tensor_shape.TensorShape([clengths[0]]).concatenate(
356 value.shape[1:]))
357 flow_out = gen_data_flow_ops.tensor_array_split_v3(
358 handle=self._handle,
359 value=value,
360 lengths=lengths_64,
361 flow_in=self._flow,
362 name=name)
363 return build_ta_with_new_flow(self, flow_out)
364
365 def size(self, name=None):
366 """See TensorArray."""

Callers

nothing calls this directly

Calls 9

_maybe_colocate_withMethod · 0.95
_check_element_shapeMethod · 0.95
build_ta_with_new_flowFunction · 0.85
executing_eagerlyMethod · 0.80
name_scopeMethod · 0.45
castMethod · 0.45
maxMethod · 0.45
minMethod · 0.45
concatenateMethod · 0.45

Tested by

no test coverage detected