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
之一。small (布林, 選用) – 如果
True
,則使用小尺寸影像,即調整大小為 256 x 256 像素,而不是高解析度影像。download (布林, 選用) – 如果
True
,則下載資料集元件並將它們放置在root
中。已經下載的封存檔不會再次下載。transform (可呼叫物件, 選用) – 一個函式/轉換,它接受 PIL 影像並傳回轉換後的版本。例如,
transforms.RandomCrop
target_transform (可呼叫物件, 選用) – 一個函式/轉換,它接受目標並轉換它。
loader – 一個用來載入影像的函式,給定其路徑。
- 引發:
RuntimeError – 如果
download is False
並且 meta 檔案(即開發套件)不存在或已損壞。RuntimeError – 如果
download is True
並且影像封存檔已解壓縮。
- 特殊成員: