Skip to content
Discussion options

You must be logged in to vote

hi @Levishery , thanks for the question.

The first load_from is used to load the pre-trained weights from self-supervised learning before fine-tuning on segmentation task. The pre-training weights only has the Swin Transformer which serves the encoder part of SwinUNETR. So the load_from function is to match keys only for SwinUNETR encoder.

Later, for test, the entire Swin UNETR model weights need to be loaded. Thus, the direct torch.load is used.

For your case, if your pre-trained model is trained on entire Swin UNETR, you can directly load weights with "torch.load", if your pre-trained model is only for the encoder, "load_from" might help.

Thanks.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Levishery
Comment options

Answer selected by Levishery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants