Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果使用更大的数据集?例如CIFAR100? #52

Open
longmalongma opened this issue Sep 23, 2022 · 1 comment
Open

如果使用更大的数据集?例如CIFAR100? #52

longmalongma opened this issue Sep 23, 2022 · 1 comment

Comments

@longmalongma
Copy link

感谢你很棒的工作,如果使用更大的数据集?例如CIFAR100?能提供可以跑多个不同数据集的训练脚本吗?谢谢

@AlexHex7
Copy link
Owner

@longmalongma Hi,

torchvision.datasets中提供了常见的数据集(CIFAR, VOC, Cityscapes等)。

可修改代码中的data部分:

train_data = torchvision.datasets.MNIST(root='./mnist', train=True,
transform=torchvision.transforms.ToTensor(),
download=True)
test_data = torchvision.datasets.MNIST(root='./mnist/',
transform=torchvision.transforms.ToTensor(),
train=False)

例如,修改为CIFAR100, 并设计合适输入尺寸的Network.
train_data = torchvision.datasets.CIFAR100(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants