diff --git a/torchvision/datasets/caltech.py b/torchvision/datasets/caltech.py index 3a9635dfe09..17f274d0113 100644 --- a/torchvision/datasets/caltech.py +++ b/torchvision/datasets/caltech.py @@ -23,7 +23,7 @@ class Caltech101(VisionDataset): target types. ``category`` represents the target class, and ``annotation`` is a list of points from a hand-generated outline. Defaults to ``category``. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. @@ -151,7 +151,7 @@ class Caltech256(VisionDataset): Args: root (string): Root directory of dataset where directory ``caltech256`` exists or will be saved to if download is set to True. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/celeba.py b/torchvision/datasets/celeba.py index d055f92f194..9136452f31a 100644 --- a/torchvision/datasets/celeba.py +++ b/torchvision/datasets/celeba.py @@ -31,7 +31,7 @@ class CelebA(VisionDataset): Defaults to ``attr``. If empty, ``None`` will be returned as target. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.PILToTensor`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/cifar.py b/torchvision/datasets/cifar.py index a2c4a7dc4c2..4df0306634e 100644 --- a/torchvision/datasets/cifar.py +++ b/torchvision/datasets/cifar.py @@ -17,7 +17,7 @@ class CIFAR10(VisionDataset): ``cifar-10-batches-py`` exists or will be saved to if download is set to True. train (bool, optional): If True, creates dataset from training set, otherwise creates from test set. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/clevr.py b/torchvision/datasets/clevr.py index 94e261e3355..f9ee63558fd 100644 --- a/torchvision/datasets/clevr.py +++ b/torchvision/datasets/clevr.py @@ -18,7 +18,7 @@ class CLEVRClassification(VisionDataset): root (string): Root directory of dataset where directory ``root/clevr`` exists or will be saved to if download is set to True. split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``. - transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in them target and transforms it. download (bool, optional): If true, downloads the dataset from the internet and puts it in root directory. If diff --git a/torchvision/datasets/coco.py b/torchvision/datasets/coco.py index f53aba16e5f..7fda9667938 100644 --- a/torchvision/datasets/coco.py +++ b/torchvision/datasets/coco.py @@ -14,7 +14,7 @@ class CocoDetection(VisionDataset): Args: root (string): Root directory where images are downloaded to. annFile (string): Path to json annotation file. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.PILToTensor`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. @@ -65,7 +65,7 @@ class CocoCaptions(CocoDetection): Args: root (string): Root directory where images are downloaded to. annFile (string): Path to json annotation file. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.PILToTensor`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/country211.py b/torchvision/datasets/country211.py index 59598fd44e2..906fdfb2065 100644 --- a/torchvision/datasets/country211.py +++ b/torchvision/datasets/country211.py @@ -16,7 +16,7 @@ class Country211(ImageFolder): Args: root (string): Root directory of the dataset. split (string, optional): The dataset split, supports ``"train"`` (default), ``"valid"`` and ``"test"``. - transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If True, downloads the dataset from the internet and puts it into diff --git a/torchvision/datasets/dtd.py b/torchvision/datasets/dtd.py index 2b10efe94e2..b4e045e7c20 100644 --- a/torchvision/datasets/dtd.py +++ b/torchvision/datasets/dtd.py @@ -21,7 +21,7 @@ class DTD(VisionDataset): The partition only changes which split each image belongs to. Thus, regardless of the selected partition, combining all splits will result in all images. - transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If True, downloads the dataset from the internet and diff --git a/torchvision/datasets/eurosat.py b/torchvision/datasets/eurosat.py index bec6df5312d..2ae8c073202 100644 --- a/torchvision/datasets/eurosat.py +++ b/torchvision/datasets/eurosat.py @@ -10,7 +10,7 @@ class EuroSAT(ImageFolder): Args: root (string): Root directory of dataset where ``root/eurosat`` exists. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/fakedata.py b/torchvision/datasets/fakedata.py index 5b2d01db2e8..af26a8579e5 100644 --- a/torchvision/datasets/fakedata.py +++ b/torchvision/datasets/fakedata.py @@ -13,7 +13,7 @@ class FakeData(VisionDataset): size (int, optional): Size of the dataset. Default: 1000 images image_size(tuple, optional): Size if the returned images. Default: (3, 224, 224) num_classes(int, optional): Number of classes in the dataset. Default: 10 - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/fer2013.py b/torchvision/datasets/fer2013.py index bcd20c1e4a2..90bf5f304cd 100644 --- a/torchvision/datasets/fer2013.py +++ b/torchvision/datasets/fer2013.py @@ -17,7 +17,7 @@ class FER2013(VisionDataset): root (string): Root directory of dataset where directory ``root/fer2013`` exists. split (string, optional): The dataset split, supports ``"train"`` (default), or ``"test"``. - transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. """ diff --git a/torchvision/datasets/fgvc_aircraft.py b/torchvision/datasets/fgvc_aircraft.py index aa705b305d8..e4b071712c3 100644 --- a/torchvision/datasets/fgvc_aircraft.py +++ b/torchvision/datasets/fgvc_aircraft.py @@ -28,7 +28,7 @@ class FGVCAircraft(VisionDataset): ``trainval`` and ``test``. annotation_level (str, optional): The annotation level, supports ``variant``, ``family`` and ``manufacturer``. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/flowers102.py b/torchvision/datasets/flowers102.py index fdaf2ddb4d1..41966f336d2 100644 --- a/torchvision/datasets/flowers102.py +++ b/torchvision/datasets/flowers102.py @@ -24,7 +24,7 @@ class Flowers102(VisionDataset): Args: root (string): Root directory of the dataset. split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``. - transform (callable, optional): A function/transform that takes in an PIL image and returns a + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If true, downloads the dataset from the internet and diff --git a/torchvision/datasets/folder.py b/torchvision/datasets/folder.py index 40d5e26d242..49519233810 100644 --- a/torchvision/datasets/folder.py +++ b/torchvision/datasets/folder.py @@ -284,7 +284,7 @@ class ImageFolder(DatasetFolder): Args: root (string): Root directory path. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/food101.py b/torchvision/datasets/food101.py index d2557a82736..fa38abd7238 100644 --- a/torchvision/datasets/food101.py +++ b/torchvision/datasets/food101.py @@ -21,7 +21,7 @@ class Food101(VisionDataset): Args: root (string): Root directory of the dataset. split (string, optional): The dataset split, supports ``"train"`` (default) and ``"test"``. - transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If True, downloads the dataset from the internet and diff --git a/torchvision/datasets/gtsrb.py b/torchvision/datasets/gtsrb.py index f99a688586d..ec746fbf686 100644 --- a/torchvision/datasets/gtsrb.py +++ b/torchvision/datasets/gtsrb.py @@ -15,7 +15,7 @@ class GTSRB(VisionDataset): Args: root (string): Root directory of the dataset. split (string, optional): The dataset split, supports ``"train"`` (default), or ``"test"``. - transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If True, downloads the dataset from the internet and diff --git a/torchvision/datasets/imagenet.py b/torchvision/datasets/imagenet.py index 9734d34ba88..290ae8f157f 100644 --- a/torchvision/datasets/imagenet.py +++ b/torchvision/datasets/imagenet.py @@ -30,7 +30,7 @@ class ImageNet(ImageFolder): Args: root (string): Root directory of the ImageNet Dataset. split (string, optional): The dataset split, supports ``train``, or ``val``. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/imagenette.py b/torchvision/datasets/imagenette.py index a6353d066db..bf0835ce0ab 100644 --- a/torchvision/datasets/imagenette.py +++ b/torchvision/datasets/imagenette.py @@ -17,7 +17,7 @@ class Imagenette(VisionDataset): size (string, optional): The image size. Supports ``"full"`` (default), ``"320px"``, and ``"160px"``. download (bool, optional): If ``True``, downloads the dataset components and places them in ``root``. Already downloaded archives are not downloaded again. - transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version, e.g. ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/inaturalist.py b/torchvision/datasets/inaturalist.py index 50b32ef0f4a..84d6907b485 100644 --- a/torchvision/datasets/inaturalist.py +++ b/torchvision/datasets/inaturalist.py @@ -54,7 +54,7 @@ class INaturalist(VisionDataset): Can also be a list to output a tuple with all specified target types. Defaults to ``full``. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/kinetics.py b/torchvision/datasets/kinetics.py index 16804c401f1..a5fda53aa90 100644 --- a/torchvision/datasets/kinetics.py +++ b/torchvision/datasets/kinetics.py @@ -56,7 +56,7 @@ class Kinetics(VisionDataset): split (str): split of the dataset to consider; supports ``"train"`` (default) ``"val"`` ``"test"`` frame_rate (float): If omitted, interpolate different frame rate for each clip. step_between_clips (int): number of frames between each clip - transform (callable, optional): A function/transform that takes in a TxHxWxC video + transform (callable, optional): A function/transform that takes in a TxHxWxC video and returns a transformed version. download (bool): Download the official version of the dataset to root folder. num_workers (int): Use multiple workers for VideoClips creation diff --git a/torchvision/datasets/lfw.py b/torchvision/datasets/lfw.py index 7a5aa45aa4d..f46c4e4c872 100644 --- a/torchvision/datasets/lfw.py +++ b/torchvision/datasets/lfw.py @@ -101,7 +101,7 @@ class LFWPeople(_LFW): ``10fold`` (default). image_set (str, optional): Type of image funneling to use, ``original``, ``funneled`` or ``deepfunneled``. Defaults to ``funneled``. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomRotation`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. @@ -183,7 +183,7 @@ class LFWPairs(_LFW): ``10fold``. Defaults to ``10fold``. image_set (str, optional): Type of image funneling to use, ``original``, ``funneled`` or ``deepfunneled``. Defaults to ``funneled``. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomRotation`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/lsun.py b/torchvision/datasets/lsun.py index a936351cdcc..6fab66ff11e 100644 --- a/torchvision/datasets/lsun.py +++ b/torchvision/datasets/lsun.py @@ -63,7 +63,7 @@ class LSUN(VisionDataset): root (string): Root directory for the database files. classes (string or list): One of {'train', 'val', 'test'} or a list of categories to load. e,g. ['bedroom_train', 'church_outdoor_train']. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/mnist.py b/torchvision/datasets/mnist.py index a8bc457020d..fce8583985c 100644 --- a/torchvision/datasets/mnist.py +++ b/torchvision/datasets/mnist.py @@ -27,7 +27,7 @@ class MNIST(VisionDataset): download (bool, optional): If True, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. @@ -210,7 +210,7 @@ class FashionMNIST(MNIST): download (bool, optional): If True, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. @@ -238,7 +238,7 @@ class KMNIST(MNIST): download (bool, optional): If True, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. @@ -269,7 +269,7 @@ class EMNIST(MNIST): download (bool, optional): If True, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. @@ -360,7 +360,7 @@ class QMNIST(MNIST): the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. transform (callable, optional): A function/transform that - takes in an PIL image and returns a transformed + takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/moving_mnist.py b/torchvision/datasets/moving_mnist.py index ac5a2b1503d..9dea36e4223 100644 --- a/torchvision/datasets/moving_mnist.py +++ b/torchvision/datasets/moving_mnist.py @@ -17,7 +17,7 @@ class MovingMNIST(VisionDataset): split_ratio (int, optional): The split ratio of number of frames. If ``split="train"``, the first split frames ``data[:, :split_ratio]`` is returned. If ``split="test"``, the last split frames ``data[:, split_ratio:]`` is returned. If ``split=None``, this parameter is ignored and the all frames data is returned. - transform (callable, optional): A function/transform that takes in an torch Tensor + transform (callable, optional): A function/transform that takes in a torch Tensor and returns a transformed version. E.g, ``transforms.RandomCrop`` download (bool, optional): If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not diff --git a/torchvision/datasets/omniglot.py b/torchvision/datasets/omniglot.py index 41d18c1bdd5..42717529a47 100644 --- a/torchvision/datasets/omniglot.py +++ b/torchvision/datasets/omniglot.py @@ -15,7 +15,7 @@ class Omniglot(VisionDataset): ``omniglot-py`` exists. background (bool, optional): If True, creates dataset from the "background" set, otherwise creates from the "evaluation" set. This terminology is defined by the authors. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/oxford_iiit_pet.py b/torchvision/datasets/oxford_iiit_pet.py index 667ee13717d..e4022251a8d 100644 --- a/torchvision/datasets/oxford_iiit_pet.py +++ b/torchvision/datasets/oxford_iiit_pet.py @@ -23,7 +23,7 @@ class OxfordIIITPet(VisionDataset): If empty, ``None`` will be returned as target. - transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If True, downloads the dataset from the internet and puts it into diff --git a/torchvision/datasets/pcam.py b/torchvision/datasets/pcam.py index c21f66186ce..4c63edec1d5 100644 --- a/torchvision/datasets/pcam.py +++ b/torchvision/datasets/pcam.py @@ -20,7 +20,7 @@ class PCAM(VisionDataset): Args: root (string): Root directory of the dataset. split (string, optional): The dataset split, supports ``"train"`` (default), ``"test"`` or ``"val"``. - transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If True, downloads the dataset from the internet and puts it into ``root/pcam``. If diff --git a/torchvision/datasets/phototour.py b/torchvision/datasets/phototour.py index cfcedf78cab..5c7dd6b66da 100644 --- a/torchvision/datasets/phototour.py +++ b/torchvision/datasets/phototour.py @@ -26,7 +26,7 @@ class PhotoTour(VisionDataset): Args: root (string): Root directory where images are. name (string): Name of the dataset to load. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. download (bool, optional): If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not diff --git a/torchvision/datasets/places365.py b/torchvision/datasets/places365.py index 5c97202a2e6..b98fc5e33b4 100644 --- a/torchvision/datasets/places365.py +++ b/torchvision/datasets/places365.py @@ -19,7 +19,7 @@ class Places365(VisionDataset): high resolution ones. download (bool, optional): If ``True``, downloads the dataset components and places them in ``root``. Already downloaded archives are not downloaded again. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/rendered_sst2.py b/torchvision/datasets/rendered_sst2.py index 58ea2f9cfe9..6fa09b677bb 100644 --- a/torchvision/datasets/rendered_sst2.py +++ b/torchvision/datasets/rendered_sst2.py @@ -22,7 +22,7 @@ class RenderedSST2(VisionDataset): Args: root (string): Root directory of the dataset. split (string, optional): The dataset split, supports ``"train"`` (default), `"val"` and ``"test"``. - transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If True, downloads the dataset from the internet and diff --git a/torchvision/datasets/semeion.py b/torchvision/datasets/semeion.py index c47703afbde..0703d267ad5 100644 --- a/torchvision/datasets/semeion.py +++ b/torchvision/datasets/semeion.py @@ -14,7 +14,7 @@ class SEMEION(VisionDataset): Args: root (string): Root directory of dataset where directory ``semeion.py`` exists. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/stanford_cars.py b/torchvision/datasets/stanford_cars.py index 3e9430ef214..2b169965e70 100644 --- a/torchvision/datasets/stanford_cars.py +++ b/torchvision/datasets/stanford_cars.py @@ -21,7 +21,7 @@ class StanfordCars(VisionDataset): Args: root (string): Root directory of dataset split (string, optional): The dataset split, supports ``"train"`` (default) or ``"test"``. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/stl10.py b/torchvision/datasets/stl10.py index f47d0c32a2c..fbfd6650a97 100644 --- a/torchvision/datasets/stl10.py +++ b/torchvision/datasets/stl10.py @@ -19,7 +19,7 @@ class STL10(VisionDataset): folds (int, optional): One of {0-9} or None. For training, loads one of the 10 pre-defined folds of 1k samples for the standard evaluation procedure. If no value is passed, loads the 5k samples. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/sun397.py b/torchvision/datasets/sun397.py index 0a1ffef9b98..a32644b940c 100644 --- a/torchvision/datasets/sun397.py +++ b/torchvision/datasets/sun397.py @@ -15,7 +15,7 @@ class SUN397(VisionDataset): Args: root (string): Root directory of the dataset. - transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop``. target_transform (callable, optional): A function/transform that takes in the target and transforms it. download (bool, optional): If true, downloads the dataset from the internet and diff --git a/torchvision/datasets/svhn.py b/torchvision/datasets/svhn.py index 8a0d70b8fd0..ece384e2daa 100644 --- a/torchvision/datasets/svhn.py +++ b/torchvision/datasets/svhn.py @@ -22,7 +22,7 @@ class SVHN(VisionDataset): root (string): Root directory of the dataset where the data is stored. split (string): One of {'train', 'test', 'extra'}. Accordingly dataset is selected. 'extra' is Extra training set. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/ucf101.py b/torchvision/datasets/ucf101.py index 60e83e158a3..7dece183060 100644 --- a/torchvision/datasets/ucf101.py +++ b/torchvision/datasets/ucf101.py @@ -36,7 +36,7 @@ class UCF101(VisionDataset): fold (int, optional): which fold to use. Should be between 1 and 3. train (bool, optional): if ``True``, creates a dataset from the train split, otherwise from the ``test`` split. - transform (callable, optional): A function/transform that takes in a TxHxWxC video + transform (callable, optional): A function/transform that takes in a TxHxWxC video and returns a transformed version. output_format (str, optional): The format of the output video tensors (before transforms). Can be either "THWC" (default) or "TCHW". diff --git a/torchvision/datasets/usps.py b/torchvision/datasets/usps.py index d61d8c30368..25f54d57cc9 100644 --- a/torchvision/datasets/usps.py +++ b/torchvision/datasets/usps.py @@ -18,7 +18,7 @@ class USPS(VisionDataset): root (string): Root directory of dataset to store``USPS`` data files. train (bool, optional): If True, creates dataset from ``usps.bz2``, otherwise from ``usps.t.bz2``. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/vision.py b/torchvision/datasets/vision.py index 43e8c55529e..82debfc881f 100644 --- a/torchvision/datasets/vision.py +++ b/torchvision/datasets/vision.py @@ -15,7 +15,7 @@ class VisionDataset(data.Dataset): root (string, optional): Root directory of dataset. Only used for `__repr__`. 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 + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/voc.py b/torchvision/datasets/voc.py index dc29bca5766..cf76b8e5926 100644 --- a/torchvision/datasets/voc.py +++ b/torchvision/datasets/voc.py @@ -128,7 +128,7 @@ class VOCSegmentation(_VOCBase): download (bool, optional): If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. @@ -173,7 +173,7 @@ class VOCDetection(_VOCBase): puts it in root directory. If dataset is already downloaded, it is not downloaded again. (default: alphabetic indexing of VOC's 20 classes). - transform (callable, optional): A function/transform that takes in an PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, required): A function/transform that takes in the target and transforms it. diff --git a/torchvision/datasets/widerface.py b/torchvision/datasets/widerface.py index aa520455ef1..96c5dee8c1f 100644 --- a/torchvision/datasets/widerface.py +++ b/torchvision/datasets/widerface.py @@ -26,7 +26,7 @@ class WIDERFace(VisionDataset): └── WIDER_test ('WIDER_test.zip' if compressed) split (string): The dataset split to use. One of {``train``, ``val``, ``test``}. Defaults to ``train``. - transform (callable, optional): A function/transform that takes in a PIL image + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it.