Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretrained imagenet models not compatible with current code #1

Open
alevine0 opened this issue Jan 7, 2021 · 0 comments
Open

Pretrained imagenet models not compatible with current code #1

alevine0 opened this issue Jan 7, 2021 · 0 comments

Comments

@alevine0
Copy link

alevine0 commented Jan 7, 2021

The code is not compatible with the provided pertained imagenet models, in that it does not provide required 'norm' and 'log_sig' elements in the state_dict. I think this must be due to a change in the normalization technique used since training. Could you provide information/code for the original normalization method? Thanks.

bash-4.2$ python3 -m src.test --output-dir=imagenet --dataset-skip=1000 --noise=Uniform --sigma 0.5 --experiment-name=imagenet_uniform_0.5 --model ResNet --noise-batch-size=128 --save-path=imagenet/imagenet_uniform_0.5/imagenet_uniform_050.pt --dataset imagenet /nfshomes/alevine0/.local/lib/python3.7/site-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead. import pandas.util.testing as tm Traceback (most recent call last): File "/home/alevine0/miniconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/alevine0/miniconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/alevine0/rs4a/src/test.py", line 59, in <module> model.load_state_dict(saved_dict) File "/home/alevine0/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1045, in load_state_dict self.__class__.__name__, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for ResNet: Missing key(s) in state_dict: "norm.module.mu", "norm.module.log_sig".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant