grain.experimental.ZipMapDataset#
- class grain.experimental.ZipMapDataset(parents)#
Combines MapDatasets of the same length to return a tuple of items.
- Parameters:
parents (Sequence[dataset.MapDataset[T]])
- __init__(parents)#
- Parameters:
parents (Sequence[MapDataset[T]])
Methods
__init__(parents)apply(transformations)Returns a dataset with the given transformation(s) applied.
batch(batch_size, *[, drop_remainder, batch_fn])Returns a dataset of elements batched along a new first dimension.
filter(transform)Returns a dataset containing only the elements that match the filter.
map(transform)Returns a dataset containing the elements transformed by
transform.map_with_index(transform)Returns a dataset containing the elements transformed by
transform.pipe(func, /, *args, **kwargs)Syntactic sugar for applying a callable to this dataset.
random_map(transform, *[, seed])Returns a dataset containing the elements transformed by
transform.repeat([num_epochs, reseed_each_epoch])Returns a dataset repeating the elements of this dataset multiple times.
seed(seed)Returns a dataset that uses the seed for default seed generation.
shuffle([seed])Returns a dataset with the same elements in a globally shuffled order.
slice(sl)Returns a dataset containing only the elements with indices in
sl.to_iter_dataset([read_options, allow_nones])Converts this dataset to an
IterDataset.Attributes
parents