Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc updates to transforms, loss and UNETR #181

Merged
merged 7 commits into from
Dec 10, 2023
Merged

Conversation

constantinpape
Copy link
Owner

No description provided.

Copy link
Owner Author

@constantinpape constantinpape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This contains a couple recent changes, the most important thing is an update to allow passing a state dict to UNETR as well. This makes it easier to change encoder checkpoints, so that they don't have to be resaved and so that we don't need to update the code to parse the checkpoints every time.

@anwai98 with these changes loading the checkpoint from @cdalinghaus still fails with the following error:

RuntimeError: Error(s) in loading state_dict for ViT_MAE:                                                                                                                              
        Missing key(s) in state_dict: "head.weight", "head.bias".                                                                                                                      
        size mismatch for pos_embed: copying a param with shape torch.Size([1, 197, 1024]) from checkpoint, the shape in current model is torch.Size([1, 4097, 1024]).

scripts/load_mae_vit.py Outdated Show resolved Hide resolved
torch_em/model/unetr.py Show resolved Hide resolved
@constantinpape constantinpape marked this pull request as ready for review December 10, 2023 18:36
@constantinpape constantinpape merged commit 3055a76 into main Dec 10, 2023
4 checks passed
@constantinpape constantinpape deleted the more-loss-updates branch December 10, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants