Auto3dSeg Failing for SwinUnet - Incorrect Parameter Dimensions #1235
-
I'm trying to replicate the Auto3dSeg results on the medical decathlon prostate data (task_05). However, I'm running into the following error during the SwinUnet training stage: RuntimeError: Error(s) in loading state_dict for SwinUNETR:
size mismatch for swinViT.patch_embed.proj.weight: copying a param with shape torch.Size([48, 1, 2, 2, 2]) from checkpoint, the shape in current model is torch.Size([48, 2, 2, 2, 2]).
size mismatch for encoder1.layer.conv1.conv.weight: copying a param with shape torch.Size([48, 1, 3, 3, 3]) from checkpoint, the shape in current model is torch.Size([48, 2, 3, 3, 3]).
size mismatch for encoder1.layer.conv3.conv.weight: copying a param with shape torch.Size([48, 1, 1, 1, 1]) from checkpoint, the shape in current model is torch.Size([48, 2, 1, 1, 1]). Looking into the I didn't have this error ~2 months ago when running on the prostate data. Any suggestions on what I can do to fix this? Related issue opened here |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
hi @tangy5, can you look into this ticket? I am thinking it is possible that loading pre-trained weights does not support multi-channel input. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
add @heyufan1995 here for further discussion. |
Beta Was this translation helpful? Give feedback.
add @heyufan1995 here for further discussion.