diff --git a/torchvision/datasets/coco.py b/torchvision/datasets/coco.py index 5ce42ddad72..9dd3c7adf85 100644 --- a/torchvision/datasets/coco.py +++ b/torchvision/datasets/coco.py @@ -14,6 +14,8 @@ class CocoCaptions(VisionDataset): and returns a transformed version. E.g, ``transforms.ToTensor`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. Example: @@ -86,6 +88,8 @@ class CocoDetection(VisionDataset): and returns a transformed version. E.g, ``transforms.ToTensor`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. """ def __init__(self, root, annFile, transform=None, target_transform=None, transforms=None): diff --git a/torchvision/datasets/sbd.py b/torchvision/datasets/sbd.py index 901e45d0c83..3c9202fdbfd 100644 --- a/torchvision/datasets/sbd.py +++ b/torchvision/datasets/sbd.py @@ -36,7 +36,7 @@ class SBDataset(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. - xy_transform (callable, optional): A function/transform that takes input sample and its target as entry + transforms (callable, optional): A function/transform that takes input sample and its target as entry and returns a transformed version. Input sample is PIL image and target is a numpy array if `mode='boundaries'` or PIL image if `mode='segmentation'`. """ diff --git a/torchvision/datasets/voc.py b/torchvision/datasets/voc.py index 47f28d5c619..390c441911d 100644 --- a/torchvision/datasets/voc.py +++ b/torchvision/datasets/voc.py @@ -66,6 +66,8 @@ class VOCSegmentation(VisionDataset): and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. """ def __init__(self, @@ -145,6 +147,8 @@ class VOCDetection(VisionDataset): and returns a transformed version. E.g, ``transforms.RandomCrop`` target_transform (callable, required): A function/transform that takes in the target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. """ def __init__(self,