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

cifar transform #17

Open
hiyuchang opened this issue Dec 29, 2020 · 1 comment
Open

cifar transform #17

hiyuchang opened this issue Dec 29, 2020 · 1 comment

Comments

@hiyuchang
Copy link

hiyuchang commented Dec 29, 2020

Hello. Thanks for you nice code. But I think the accuracy can be better with the new 'tranform' of cifar:

        trans_train = transforms.Compose([
            transforms.RandomCrop(32, padding=4),
            transforms.RandomHorizontalFlip(),
            transforms.ToTensor(),
            transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)),
        ])
        trans_test = transforms.Compose([
            transforms.ToTensor(),
            transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)),
        ])
        dataset_train = datasets.CIFAR10('../data/cifar', train=True, download=True, transform=trans_train)
        dataset_test = datasets.CIFAR10('../data/cifar', train=False, download=True, transform=trans_test)
@JokerZhang66
Copy link

I think the test_dataset should be this:
test_transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.4940, 0.4850, 0.4504), (0.2467, 0.2429, 0.2616))])

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