Document errors that can be raised by functions

This commit is contained in:
Adam J. Stewart 2021-06-07 18:09:28 +00:00
Родитель 3a3b5d80af
Коммит bc7e8be56a
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -74,6 +74,11 @@ class LandCoverAI(VisionDataset):
transforms: a function/transform that takes input sample and its target as
entry and returns a transformed version
download: if True, download dataset and store it in the root directory
Raises:
AssertionError: if ``split`` argument is invalid
RuntimeError: if ``download=False`` and data is not found, or checksums
don't match
"""
assert split in ["train", "val", "test"]

Просмотреть файл

@ -93,6 +93,11 @@ class VHR10(VisionDataset):
transforms: a function/transform that takes input sample and its target as
entry and returns a transformed version
download: if True, download dataset and store it in the root directory
Raises:
AssertionError: if ``split`` argument is invalid
RuntimeError: if ``download=False`` and data is not found, or checksums
don't match
"""
assert split in ["positive", "negative"]