Places365¶
-
class
torchvision.datasets.
Places365
(root: str, split: str = 'train-standard', small: bool = False, download: bool = False, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, loader: Callable[[str], Any] = <function default_loader>)[source]¶ Places365 classification dataset.
- Parameters
root (string) – Root directory of the Places365 dataset.
split (string, optional) – The dataset split. Can be one of
train-standard
(default),train-challenge
,val
.small (bool, optional) – If
True
, uses the small images, i. e. resized to 256 x 256 pixels, instead of the high resolution ones.download (bool, optional) – If
True
, downloads the dataset components and places them inroot
. Already downloaded archives are not downloaded again.transform (callable, optional) – A function/transform that takes in an PIL image and returns a transformed version. E.g,
transforms.RandomCrop
target_transform (callable, optional) – A function/transform that takes in the target and transforms it.
loader – A function to load an image given its path.
- Raises
RuntimeError – If
download is False
and the meta files, i. e. the devkit, are not present or corrupted.RuntimeError – If
download is True
and the image archive is already extracted.
- Special-members