Skip to content

error in step 2 training #3

Description

@fjremnav

I am able to train based model. However, it encounters an error in step2 training below when it tries to load PSPNet.pt from step 1.

python train.py --model_name PSPNet --lstm True --use_pre True --noise False --data_dir cityscapes/

Traceback (most recent call last):
File "train.py", line 108, in
train(args)
File "train.py", line 78, in train
init_model = load_model(args)
File "/home/user/4TB/user1/NoisyLSTM/tools/tool.py", line 285, in load_model
pre_model.load_state_dict(new_state_dict, strict=True)
File "/home/user1/anaconda3/envs/remnav/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 PspNet:
Missing key(s) in state_dict: "layer0.0.weight", "layer0.1.weight", "layer0.1.bias", "layer0.1.running_mean", "layer0.1.running_var", "layer1.0.conv1.
weight", "layer1.0.bn1.weight", "layer1.0.bn1.bias", "layer1.0.bn1.running_mean", "layer1.0.bn1.running_var", "layer1.0.conv2.weight", "layer1.0.bn2.weight",
"layer1.0.bn2.bias", "layer1.0.bn2.running_mean", "layer1.0.bn2.running_var", "layer1.0.conv3.weight", "layer1.0.bn3.weight", "layer1.0.bn3.bias", "layer1.0.b ,,,,,

Any idea why this happens

Thanks,

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