he-y / soft-filter-pruning

Soft Filter Pruning for Accelerating Deep Convolutional Neural Networks
https://arxiv.org/abs/1808.06866
376 stars 74 forks source link

RuntimeError: Given input size: (512x1x1). Calculated output size: (512x-5x-5). Output size is too small #17

Closed simon5u closed 4 years ago

simon5u commented 4 years ago

Hi, I am trying to repeat your training on cifar 10 using pruning_cifar10_resnet.py and cifar10_resnet.sh. It is working fine on resnet110, but i got the following error if i change to resnet18. Why there are two types of resnet, resnet[18,34,50,101] versus resnet[20,32,56,110]?

Error:- self.padding, self.ceil_mode, self.count_include_pad, self.divisor_override) RuntimeError: Given input size: (512x1x1). Calculated output size: (512x-5x-5). Output size is too small

he-y commented 4 years ago

It's for the different datasets. Please take a look at Kaiming's (ResNet paper)[https://arxiv.org/abs/1512.03385].