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
transform
acts on data of the typeTensor
. The transform will be inserted before or afterToTensor
depending on if this isTrue
orFalse
respectively. IfToTensor
is not present, the transform will be appended to the end of the collection of transforms. (default:False
)
- Returns
None โ The
dataset
is modified in-place.