grain.experimental.apply_transformations#
- grain.experimental.apply_transformations(ds, transformations)#
Applies transformations to a dataset.
- Parameters:
ds (_ConsistentDatasetType) – MapDataset or IterDataset to apply the transformations to.
transformations (Batch | MapTransform | RandomMapTransform | TfRandomMapTransform | Filter | FlatMapTransform | MapWithIndex | Sequence[Batch | MapTransform | RandomMapTransform | TfRandomMapTransform | Filter | FlatMapTransform | MapWithIndex]) – one or more transformations to apply.
- Returns:
Dataset of the same type with transformations applied.
- Return type:
_ConsistentDatasetType