Skip to content

Weights for head module are not the correct dimensions #29

@MarcoTab

Description

@MarcoTab

Hello! I'm working on a school project that requires realtime 3D semantic segmentation and this code has helped immensly!

When trying to load a Segmentator module from the pytorch-code directory, I come across the following error message:

Successfully loaded model backbone weights
Successfully loaded model decoder weights
Couldn't load head, using random weights. Error:  Error(s) in loading state_dict for Sequential:
        size mismatch for 0.weight: copying a param with shape torch.Size([20, 48, 3, 3]) from checkpoint, the shape in current model is torch.Size([34, 48, 3, 3]).
        size mismatch for 0.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([34]).

Which given that I want to perform segmentation, is not ideal because this means it does not work.
I'm sure I'm using the correct model names and everything, and what's even weirder is that the decoder weights finish with a 34, not a 20, so the actual pytorch code seems to be fine. What isn't correct are the weights for the head that are stored in the 3D-MiniNet-x directories. I tried all three model sizes and they all have this same issue.

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