Places365¶
- class torchvision.datasets.Places365(root: ~typing.Union[str, ~pathlib.Path], split: str = 'train-standard', small: bool = False, download: bool = False, transform: ~typing.Optional[~typing.Callable] = None, target_transform: ~typing.Optional[~typing.Callable] = None, loader: ~typing.Callable[[str], ~typing.Any] = <function default_loader>)[source]¶
Places365 分类数据集。
- 参数:
root (str 或
pathlib.Path
) – Places365 数据集的根目录。split (string, 可选) – 数据集拆分。可以是
train-standard
(默认),train-challenge
,val
之一。small (bool, 可选) – 如果
True
, 则使用小图像,即调整大小为 256 x 256 像素,而不是高分辨率图像。download (bool, 可选) – 如果
True
, 则下载数据集组件并将它们放置在root
中。已下载的存档不会再次下载。transform (callable, 可选) – 接收 PIL 图像并返回转换版本的函数/转换。例如,
transforms.RandomCrop
target_transform (callable, 可选) – 接收目标并对其进行转换的函数/转换。
loader – 加载给定路径的图像的函数。
- 引发:
RuntimeError – 如果
download is False
且元文件(即 devkit)不存在或已损坏。RuntimeError – 如果
download is True
且图像存档已解压缩。
- 特殊成员: