tf.data.experimental.unbatch | TensorFlow v2.16.1 (original) (raw)
tf.data.experimental.unbatch
Stay organized with collections Save and categorize content based on your preferences.
Splits elements of a dataset into multiple elements on the batch dimension. (deprecated)
View aliases
Compat aliases for migration
SeeMigration guide for more details.
tf.compat.v1.data.experimental.unbatch
tf.data.experimental.unbatch()
For example, if elements of the dataset are shaped [B, a0, a1, ...]
, where B
may vary for each input element, then for each element in the dataset, the unbatched dataset will contain B
consecutive elements of shape [a0, a1, ...]
.
# NOTE: The following example uses `{ ... }` to represent the contents
# of a dataset.
a = { ['a', 'b', 'c'], ['a', 'b'], ['a', 'b', 'c', 'd'] }
a.unbatch() == {
'a', 'b', 'c', 'a', 'b', 'a', 'b', 'c', 'd'}
Returns |
---|
A Dataset transformation function, which can be passed totf.data.Dataset.apply. |