Skip to content

Load the trained model and report an error when testing separately #24

@liuge1008

Description

@liuge1008

When I use your following code to load the model:
source_state = torch.load(args.weight)
target_state = OrderedDict()
for k, v in source_state.items():
if k[:7] != 'module.':
k = 'module.' + k
target_state[k] = v
model.load_state_dict(target_state)

Report an error:
2021-05-30 15-27-50屏幕截图

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