MetaPruning
MetaPruning copied to clipboard
Question about the use of pruningNet model
Hello liuzechun, Thanks for your brilliant work.But i have some problem about how to use the pruningNet model you provide. I download the Model-MetaP-Mbv1-0.75 you provide in readme and want to evaluate the Flops and Acc1 in chart. I use the evaluate.py.But when i load the checkpoint.pth.tar i download,it says there is error in loading state_dict for DataParallel.like... ....size mismatch for module.feature.0.conv1.weight: copying a param with shape torch.Size([25, 3, 3, 3]) from checkpoint, the shape in current model is torch.Size([31, 3, 3, 3]). size mismatch for module.feature.0.bn1.weight: copying a param with shape torch.Size([25]) from checkpoint, the shape in current model is torch.Size([31])...... The code i load the stat_dict is : model = MobileNetV1() logging.info(model) model = nn.DataParallel(model).cuda() checkpoint = torch.load(checkpoint_tar) model.load_state_dict(checkpoint['state_dict']) I print the model you define in MobileNetV1.py,it's different from the structure i download from readme.Is the way i use it incorrect? Thanks again and looking forward to your reply.
Anna
Dear Anna, Thank you for your nice word, and for your interest in my work. I will check the model for you soon!
hello, are you clear about how to use the pruningNet model to evaluate the Acc1. About more discription, please refer to another similar issue https://github.com/liuzechun/MetaPruning/issues/33,
appreciated for your kindly reply. @liwenwei123