Skip to content

load pretrained weights #20

@cyl112233

Description

@cyl112233

Hello,
I would like to replace the model with exp53_SFNetDecoder during training. However, when I load the pretrained weights from:checkpoints/camvid_exp53_decoder29_200_epochs_288_1152_resize_run1
I encounter the following error:File "/Y_L/fifi/RegSeg-main/model.py", line 66, in init
if dic[k].size()==current_model[k].size():
KeyError: 'decoder.head16.stages.0.1.conv.weight'
I understand this means the pretrained weights are not compatible with the new decoder architecture.

But if I don’t use the pretrained weights, the performance is significantly worse.

May I ask: how did you load pretrained weights when changing the decoder to SFNetDecoder?
Is there a recommended way to partially load weights (e.g., only the encoder)?

Thank you very much.

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