- class paddle.vision.transforms. Compose ( transforms ) [source]
Composes several transforms together use for composing list of transforms together for a dataset transform.
transforms (list|tuple) – List/Tuple of transforms to compose.
A compose object which is callable, __call__ for this Compose object will call each given
from paddle.vision.datasets import Flowers from paddle.vision.transforms import Compose, ColorJitter, Resize transform = Compose([ColorJitter(), Resize(size=608)]) flowers = Flowers(mode='test', transform=transform) for i in range(10): sample = flowers[i] print(sample.size, sample)