Skip to content

Error(s) in loading state_dict for StackedHGNetV1: #2

@xle97

Description

@xle97

First, Thanks for your great work!

I found such an error after i download wflw-model from this link

loss_lambda: 2.0
device_id: -1
device: cpu
use_gpu: False
Traceback (most recent call last):
  File "evaluate.py", line 266, in <module>
    mode=args.mode)
  File "evaluate.py", line 214, in evaluate
    alignment = Alignment(config_name, work_dir, model_path, dl_framework, device_ids)
  File "evaluate.py", line 117, in __init__
    net.load_state_dict(checkpoint["net"])
  File "/home/rzhang/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1224, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for StackedHGNetV1:
        Unexpected key(s) in state_dict: "pre.2.1.filt", "hgs.0.pool1.1.filt", "hgs.0.low2.pool1.1.filt", "hgs.0.low2.low2.pool1.1.filt", "hgs.0.low2.low2.low2.pool1.1.filt", "hgs.1.pool1.1.filt", "hgs.1.low2.pool1.1.filt", "hgs.1.low2.low2.pool1.1.filt", "hgs.1.low2.low2.low2.pool1.1.filt", "hgs.2.pool1.1.filt", "hgs.2.low2.pool1.1.filt", "hgs.2.low2.low2.pool1.1.filt", "hgs.2.low2.low2.low2.pool1.1.filt", "hgs.3.pool1.1.filt", "hgs.3.low2.pool1.1.filt", "hgs.3.low2.low2.pool1.1.filt", "hgs.3.low2.low2.low2.pool1.1.filt".

my command is

python evaluate.py --mode=nme --config_name=alignment --model_path=model/wflw/train.pkl --metadata_path=data/WFLW/WFLW_annotations --image_dir=data/WFLW/WFLW_images --device_ids=-1

and i changed the code self.data_definition = "WFLW" in alignment.py

@huangyangyu could you help me to fix this bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions