FashionMNIST¶
- class torchvision.datasets.FashionMNIST(root: Union[str, Path], train: bool = True, transform: Optional[Callable] = None, target_transform">: Optional">[Callable] = None, download">: bool = False)[source]¶
Fashion-MNIST 数据集。
- 参数:
root (str 或
pathlib.Path
) – 数据集的根目录,其中存在FashionMNIST/raw/train-images-idx3-ubyte
和FashionMNIST/raw/t10k-images-idx3-ubyte
。train (bool, optional) – 如果为 True,则从
train-images-idx3-ubyte
创建数据集,否则从t10k-images-idx3-ubyte
创建。download (bool, optional) – 如果为 True,则从互联网下载数据集并将其放在根目录中。如果已下载数据集,则不会再次下载。
transform (callable, optional) – 接收 PIL 图像并返回转换版本的函数/转换。例如,
transforms.RandomCrop
target_transform (callable, optional) – 接收目标并转换目标的函数/转换。
- 特殊成员: