Closed ZhengHui-Z closed 3 years ago
@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!
Excellent advice
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)