Skip to content

optimizer state_dict not stable when resuming from checkpoint #10

Description

@tenggyut

Hi,

line 466 in hardnet.py iterates self.heads which is a dict. but the iterating order may differ in differ python command which will result in different parameter order in model.

when loading optimizer state dict from checkpoint, different parameter order would confusing the tensor id mapping and cause error....

simple solution would be iterate the sorted version of self.heads.keys().

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