Skip to content

Missing key(s) in state_dict: "blocks.1.synapse.weight_g", "blocks.1.synapse.weight_v", "blocks.3.synapse.weight_g", "blocks.3.synapse.weight_v", "blocks.4.synapse.weight_g", "blocks.4.synapse.weight_v" #371

@HAMBUK

Description

@HAMBUK

Describe the bug
After updating lava-dl to 0.6.0, the naming way of weight has been changed.
So when loading the pt file(which is trained in lava-dl 0.6.0 environment) for inference, I get this error

Missing key(s) in state_dict: "blocks.1.synapse.weight_g", "blocks.1.synapse.weight_v", "blocks.3.synapse.weight_g", "blocks.3.synapse.weight_v", "blocks.4.synapse.weight_g", "blocks.4.synapse.weight_v"

Problem cause:
Maybe the naming way of weights when making .pt file has been changed since the update, but loading .pt file stays same. So that is why we got the mismatch issue.

Solution:
So I downgrade my lava-dl to 0.5.0 and trained it again and get the new .pt file and check it works fine now.

Screenshots
If applicable, add screenshots to help explain your problem. Remove section otherwise.

Environment (please complete the following information):
Ubuntu 22.04 LTS
Lava-dl 0.6.0
Pytorch 2.1.0
Pyhton 3.10.0

  • Device: [e.g. Laptop, Intel cloud]
  • OS: [e.g. Linux]
  • Lava version [e.g. 0.6.1]

Additional context
Add any other context about the problem here. Remove section otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions