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

Error of CIFAR10 Dataset #10

Closed
ZhengHui-Z opened this issue Aug 7, 2021 · 2 comments
Closed

Error of CIFAR10 Dataset #10

ZhengHui-Z opened this issue Aug 7, 2021 · 2 comments

Comments

@ZhengHui-Z
Copy link

The code cannot run on the CIFAR10 dataset because the image size of CIFAR10 is 32*32 and an error will be reported if the input dimension is (1, 3, 32, 32)

@KelvinYang0320
Copy link

@ZhengHui-Z Hello, I think their code is fine.
The error you mentioned is about (N, C, H, W)=(1, 3, 32, 32), but batch norm expects more then 1 value to calculate the running mean and std of the current batch. Check this link.
You can change the batch size (N) to more than 1, or set model.eval().
I have run their code on CIFAR10 and everything works as expected.
Hope this helps!

@ZhengHui-Z
Copy link
Author

Excellent advice

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