From 5303624feee49c6ca15891d0f5041e3a1cf9cb76 Mon Sep 17 00:00:00 2001 From: Aditya Oke Date: Tue, 9 Mar 2021 22:51:39 +0530 Subject: [PATCH 1/4] add missing docs --- docs/source/datasets.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/source/datasets.rst b/docs/source/datasets.rst index 6341e00fca0..8ccdc1d7a93 100644 --- a/docs/source/datasets.rst +++ b/docs/source/datasets.rst @@ -24,6 +24,18 @@ All the datasets have almost similar API. They all have two common arguments: .. currentmodule:: torchvision.datasets + +Caltech +~~~~~~~ + +.. autoclass:: Caltech101 + :members: __getitem__ + :special-members: + +.. autoclass:: Caltech256 + :members: __getitem__ + :special-members: + CelebA ~~~~~~ @@ -192,6 +204,13 @@ SBU :members: __getitem__ :special-members: +SEMEION +~~~~~~ + +.. autoclass:: SEMEION + :members: __getitem__ + :special-members: + STL10 ~~~~~ @@ -231,3 +250,9 @@ VOC :members: __getitem__ :special-members: +WIDERFace +~~~~~~~~~ + +.. autoclass:: WIDERFace + :members: __getitem__ + :special-members: From cb2184523dec40fd82120f7f4c1cdfb68cd341d4 Mon Sep 17 00:00:00 2001 From: Aditya Oke Date: Tue, 9 Mar 2021 23:26:15 +0530 Subject: [PATCH 2/4] tries fixing docs --- docs/source/datasets.rst | 2 +- torchvision/datasets/semeion.py | 5 ++++- torchvision/datasets/widerface.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/source/datasets.rst b/docs/source/datasets.rst index 8ccdc1d7a93..ceb517ced8f 100644 --- a/docs/source/datasets.rst +++ b/docs/source/datasets.rst @@ -205,7 +205,7 @@ SBU :special-members: SEMEION -~~~~~~ +~~~~~~~ .. autoclass:: SEMEION :members: __getitem__ diff --git a/torchvision/datasets/semeion.py b/torchvision/datasets/semeion.py index dad530ffa15..20ce4e5f5d5 100644 --- a/torchvision/datasets/semeion.py +++ b/torchvision/datasets/semeion.py @@ -8,7 +8,8 @@ class SEMEION(VisionDataset): - """`SEMEION `_ Dataset. + r"""`SEMEION `_ Dataset. + Args: root (string): Root directory of dataset where directory ``semeion.py`` exists. @@ -19,6 +20,7 @@ class SEMEION(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. + """ url = "http://archive.ics.uci.edu/ml/machine-learning-databases/semeion/semeion.data" filename = "semeion.data" @@ -53,6 +55,7 @@ def __getitem__(self, index: int) -> Tuple[Any, Any]: """ Args: index (int): Index + Returns: tuple: (image, target) where target is index of the target class. """ diff --git a/torchvision/datasets/widerface.py b/torchvision/datasets/widerface.py index 5e826183f57..72c0eed472b 100644 --- a/torchvision/datasets/widerface.py +++ b/torchvision/datasets/widerface.py @@ -29,6 +29,7 @@ class WIDERFace(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. + """ BASE_FOLDER = "widerface" From c55e5d0a71651126532e677fcdb24afd8eb38170 Mon Sep 17 00:00:00 2001 From: Aditya Oke Date: Wed, 10 Mar 2021 21:58:37 +0530 Subject: [PATCH 3/4] fixes docs --- torchvision/datasets/widerface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/torchvision/datasets/widerface.py b/torchvision/datasets/widerface.py index 72c0eed472b..366bddd52aa 100644 --- a/torchvision/datasets/widerface.py +++ b/torchvision/datasets/widerface.py @@ -14,6 +14,8 @@ class WIDERFace(VisionDataset): Args: root (string): Root directory where images and annotations are downloaded to. Expects the following folder structure if download=False: + .. code:: + └── widerface ├── wider_face_split ('wider_face_split.zip' if compressed) From 87b8165cb74cb93e029132023205ca09b3b2883c Mon Sep 17 00:00:00 2001 From: Aditya Oke Date: Thu, 11 Mar 2021 19:27:17 +0530 Subject: [PATCH 4/4] fixes ..code --- torchvision/datasets/kinetics.py | 1 + torchvision/datasets/widerface.py | 1 + 2 files changed, 2 insertions(+) diff --git a/torchvision/datasets/kinetics.py b/torchvision/datasets/kinetics.py index e977fc42ba7..f459b526ca4 100644 --- a/torchvision/datasets/kinetics.py +++ b/torchvision/datasets/kinetics.py @@ -24,6 +24,7 @@ class Kinetics400(VisionDataset): Args: root (string): Root directory of the Kinetics-400 Dataset. Should be structured as follows: + .. code:: root/ diff --git a/torchvision/datasets/widerface.py b/torchvision/datasets/widerface.py index 366bddd52aa..55ad6d1e76a 100644 --- a/torchvision/datasets/widerface.py +++ b/torchvision/datasets/widerface.py @@ -14,6 +14,7 @@ class WIDERFace(VisionDataset): Args: root (string): Root directory where images and annotations are downloaded to. Expects the following folder structure if download=False: + .. code::