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, optional) – 若為 True,則從
training.pt
建立資料集,否則從test.pt
建立。download (bool, optional) – 若為 True,則從網路下載資料集並放入根目錄。若資料集已下載,則不會再次下載。
transform (callable, optional) – 一個函數/轉換,接受 PIL 圖像並返回轉換後的版本。 例如,
transforms.RandomCrop
target_transform (callable, optional) – 一個函數/轉換,接受目標並轉換它。
- 特殊成員: