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>)[原始碼]¶
Places365 分類資料集。
- 引數:
root (str 或
pathlib.Path) – Places365 資料集的根目錄。split (字串, 可選) – 資料集分割。可以是以下之一:
train-standard(預設)、train-challenge、val、test。small (bool, 可選) – 如果設定為
True,則使用小尺寸影像,即調整為 256 x 256 畫素,而不是高解析度影像。download (bool, 可選) – 如果設定為
True,則下載資料集元件並將其放置在root目錄中。已下載的存檔不會重複下載。transform (callable, optional) – 一個函式/變換,接受 PIL 影像並返回變換後的版本。例如,
transforms.RandomCroptarget_transform (可呼叫物件, 可選) – 一個函式/變換,接受目標並對其進行變換。
loader – 一個用於載入影像(給定其路徑)的函式。
- 丟擲:
RuntimeError – 如果
download 為 False且元檔案(即 devkit)不存在或已損壞。RuntimeError – 如果
download 為 True且影像存檔已解壓。
- 特殊成員: