EMNIST¶
- class torchvision.datasets.EMNIST(root: Union[str, Path], split: str, **kwargs: Any)[原始碼]¶
EMNIST 資料集。
- 引數:
root (str 或
pathlib.Path) – 資料集的根目錄,其中包含EMNIST/raw/train-images-idx3-ubyte和EMNIST/raw/t10k-images-idx3-ubyte。split (字串) – 該資料集有 6 個不同的劃分:
byclass、bymerge、balanced、letters、digits和mnist。此引數指定使用哪個。train (bool, 可選) – 如果為 True,則從
training.pt建立資料集,否則從test.pt建立。download (bool, optional) – 如果為 True,則從網際網路下載資料集並將其放入根目錄。如果資料集已下載,則不會再次下載。
transform (callable, optional) – 一個函式/變換,接受 PIL 影像並返回變換後的版本。例如,
transforms.RandomCroptarget_transform (可呼叫物件, 可選) – 一個函式/變換,接受目標並對其進行變換。
- 特殊成員: