Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
d38600fe
Commit
d38600fe
authored
Jun 24, 2019
by
Michael Kösel
Committed by
Francisco Massa
Jun 24, 2019
Browse files
Add transforms doc to more datasets (#1038)
parent
69b28578
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
torchvision/datasets/coco.py
torchvision/datasets/coco.py
+4
-0
torchvision/datasets/sbd.py
torchvision/datasets/sbd.py
+1
-1
torchvision/datasets/voc.py
torchvision/datasets/voc.py
+4
-0
No files found.
torchvision/datasets/coco.py
View file @
d38600fe
...
...
@@ -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
):
...
...
torchvision/datasets/sbd.py
View file @
d38600fe
...
...
@@ -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
transform
s
(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'`.
"""
...
...
torchvision/datasets/voc.py
View file @
d38600fe
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment