JiahuiYu / slimmable_networks

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

Size mismatch when loading us_mobilenet_v1_calibrated.pt #24

Closed bermanmaxim closed 5 years ago

bermanmaxim commented 5 years ago

When launching python train.py app:apps/us_mobilenet_v1_train_val.yml with logs/us_mobilenet_v1_calibrated.pt downloaded, I get size mismatch errors for all the running_mean and running_var of batchnorm; should I delete these parameters from the checkpoint and relaunch calibration before testing?

JiahuiYu commented 5 years ago

@bermanmaxim Sorry I missed a flag in the code. You are right - you can delete these parameters from the checkpoint and our code will relaunch calibration. The model I released is with some BN statistics of multiple widths.

I will fix this problem today in a new commit and please try out. Thanks for your interest in our work.

DamonAtSjtu commented 3 years ago

When I set ‘’width_mult_list_test‘’ with some other values that I want to test, I still meet the size mismatch errors for all the running_mean and running_var of batchnorm; I think this is because logs/us_mobilenet_v1_calibrated.pt has the bn parameters of all the width in "width_mult_list". You said you fix this problem, I want to know which version should I use to avoid this problem?