add_vision_dataset_transform#
- composer.utils.add_vision_dataset_transform(dataset, transform, is_tensor_transform=False)[source]#
Add a transform to a datasetโs collection of transforms.
- Parameters
dataset (VisionDataset) โ A torchvision dataset.
transform (Callable) โ Function to be added to the datasetโs collection of transforms.
is_tensor_transform (bool) โ Whether
transformacts on data of the typeTensor. The transform will be inserted before or afterToTensordepending on if this isTrueorFalserespectively. IfToTensoris not present, the transform will be appended to the end of the collection of transforms. (default:False)
- Returns
None โ The
datasetis modified in-place.