JiahuiYu / slimmable_networks

Slimmable Networks, AutoSlim, and Beyond, ICLR 2019, and ICCV 2019
Other
914 stars 131 forks source link

The accuracy decrease sharply after calibration, even on the given Model zoo #35

Closed ZhanHuaa closed 4 years ago

ZhanHuaa commented 4 years ago

Hi, really appreciate your excellent work. Follow by README.md, the 'us_mobilenet_v2_calibrated.pt' in direct test phase achieves a series of desirable accuracy. But when i use the given 'us_mobilenet_v2_calibrated.pt' to test the width_mult_list_test: [0.36, 0.51415926] which is defined in 'us_mobilenet_v2_train_val.yml', the model accuracy decreases sharply to nearly 0 after the 'Start calibration'. I read the code in 'train.py', and find this processing is essential to rebuild the model for user defined 'width_mult_list_test'. So why the model accuracy come to nearly zero after 'Start calibration' processing'? How can i fix it and get a normal accuracy for 'width_mult_list_test'?

lyn0102 commented 4 years ago

@ZhanHuaa I also encountered this problem, I think the reason is that the state of the model should be set to training in the "cal" phase, that is to say, "model.train ()" should be added, so that the running_mean and running_var of the bn layer can be adjusted.