tensorflow::ops::DynamicPartition
tensorflow::ops::DynamicPartition
#include <data_flow_ops.h>
Partitions data
into num_partitions
tensors using indices from partitions
.
Summary
For each index tuple js
of size partitions.ndim
, the slice data[js, ...]
becomes part of outputs[partitions[js]]
. The slices with partitions[js] = i
are placed in outputs[i]
in lexicographic order of js
, and the first dimension of outputs[i]
is the number of entries in partitions
equal to i
. In detail,
```python outputs[i].shape = [sum(partitions == i)] + data.shape[partitions.ndim:]
outputs[i] = pack([data[js, ...] for js if partitions[js] == i]) ```
data.shape
must start with partitions.shape
.
For example:
```python Scalar partitions.
parti