VisionDataset(root: str, transforms: Optional[Callable] = None, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None)¶
Base Class For making datasets which are compatible with torchvision. It is necessary to override the
root (string) – Root directory of dataset.
transforms (callable, optional) – A function/transforms that takes in an image and a label and returns the transformed versions of both.
transform (callable, optional) – A function/transform that takes in an PIL image and returns a transformed version. E.g,
target_transform (callable, optional) – A function/transform that takes in the target and transforms it.
transformsand the combination of
target_transformare mutually exclusive.