grain.experimental.FlatMapMapDataset

grain.experimental.FlatMapMapDataset#

class grain.experimental.FlatMapMapDataset(parent, transform)#

Flat map for one-to-many split.

Parameters:
__init__(parent, transform)#
Parameters:

Methods

__init__(parent, transform)

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])

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