Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ STL10
SVHN
~~~~

Note: The SVHN dataset assigns the label `10` to the digit `0`. However, in this Dataset,
we assign the label `0` to the digit `0` to be compatible with PyTorch loss functions which
expect the class labels to be in the range `[0, C-1]`

``dset.SVHN(root, split='train', transform=None, target_transform=None, download=False)``

- ``root`` : root directory of dataset where there is folder ``SVHN``
Expand Down
3 changes: 3 additions & 0 deletions torchvision/datasets/svhn.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

class SVHN(data.Dataset):
"""`SVHN <http://ufldl.stanford.edu/housenumbers/>`_ Dataset.
Note: The SVHN dataset assigns the label `10` to the digit `0`. However, in this Dataset,
we assign the label `0` to the digit `0` to be compatible with PyTorch loss functions which
expect the class labels to be in the range `[0, C-1]`

Args:
root (string): Root directory of dataset where directory
Expand Down