Skip to content

Loading of pretrained weights of the new ssl tutorial fails #461

Closed
@elitap

Description

@elitap

Describe the bug
The loading of the pretrained ViT weight ins tutorials/self_supervised_pretraining/ssl_finetuning_train.py fails with:
Unexpected key(s) in state_dict: "linear_1.weight", "linear_1.bias".

To Reproduce
Download the provided weight file from: https://drive.google.com/file/d/1z0BouIiQ9oLizubOIH9Rlpad5Kk_2RtY/view
running ssl_finetuning_train.py

Expected behavior
should load the weights

Environment (please complete the following information):
MONAI version: 0.8.0
Pytorch version: 1.9.1+cu111

Additional context
Thank you for the awsome tutorial, hope to get the pretrained weights running to save some time :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions