locuslab / deq

[NeurIPS'19] Deep Equilibrium Models
MIT License
719 stars 80 forks source link

Mismatch between a pretrained ImageNet model and a config file #31

Open metodj opened 1 year ago

metodj commented 1 year ago

Hi!

I am trying to run some initial experiments using the pretrained MDEQ model on ImageNet dataset.

As instructed in the README, I download the (small) model from here and then run the evaluation script via the following command:

python tools/cls_valid.py --testModel pretrained_models/MDEQ_Small_Cls.pkl --cfg experiments/imagenet/cls_mdeq_SMALL.yaml

However, this results in the following error

RuntimeError: Error(s) in loading state_dict for MDEQClsNet: Unexpected key(s) in state_dict: "fullstage_copy.branches.0.blocks.0.conv1.weight", ...

indicating that there is a mismatch between the saved model and the model specs in the config file.

Anyone else experiencing this issue when using pretrained ImageNet models in this repo? If so, could the authors update the pretrained models? Thanks in advance!

GuiVeiga commented 1 year ago

I also get:

RuntimeError: Error(s) in loading state_dict for MDEQClsNet:
Missing key(s) in state_dict: "downsample.0.weight", ...
Unexpected key(s) in state_dict: "model.downsample.0.weight", ...

When also trying to evaluate another pretrained model, via the following command:

python tools/cls_valid.py --testModel pretrained_models/MDEQ_Small_Seg.pkl --cfg experiments/imagenet/cls_mdeq_SMALL.yaml