Skip to content

Commit

Permalink
Add transforms doc to more datasets (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodez authored and fmassa committed Jun 24, 2019
1 parent 69b2857 commit d38600f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions torchvision/datasets/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion torchvision/datasets/sbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'`.
"""
Expand Down
4 changes: 4 additions & 0 deletions torchvision/datasets/voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d38600f

Please sign in to comment.