mindspore.dataset.transforms.c_transforms.RandomChoice¶
-
class
mindspore.dataset.transforms.c_transforms.
RandomChoice
(transforms)[source]¶ Randomly select one transform from a list of transforms to perform operation.
- Parameters
transforms (list) – List of transformations to be chosen from to apply.
Examples
>>> rand_choice = c_transforms.RandomChoice([c_vision.CenterCrop(50), c_vision.RandomCrop(512)]) >>> image_folder_dataset = image_folder_dataset.map(operations=rand_choice)