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

There is a runtime error #10

Open
happyfox-dot opened this issue Jul 7, 2022 · 1 comment
Open

There is a runtime error #10

happyfox-dot opened this issue Jul 7, 2022 · 1 comment

Comments

@happyfox-dot
Copy link

happyfox-dot commented Jul 7, 2022

Hello, thank you for your open source code.
I am using sh scripts/test_ sence. sh encountered the following problem when executing the command, which was caused by mismatched parameters.
Please tell me your sense.pth file
How did you get it? Can you share it?
Error(s) in loading state_dict for SemanticPrediction: size mismatch for input_conv.0.weight: copying a param with shape torch.Size([3, 3, 3, 16, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 16]). size mismatch for unet.blocks.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 16, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 16]). size mismatch for unet.blocks.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 16, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 16]). size mismatch for unet.blocks.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 16, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 16]). size mismatch for unet.blocks.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 16, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 16]). size mismatch for unet.conv.2.weight: copying a param with shape torch.Size([2, 2, 2, 16, 32]) from checkpoint, the shape in current model is torch.Size([32, 2, 2, 2, 16]). size mismatch for unet.u.blocks.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 32, 32]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3, 32]). size mismatch for unet.u.blocks.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 32, 32]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3, 32]). size mismatch for unet.u.blocks.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 32, 32]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3, 32]). size mismatch for unet.u.blocks.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 32, 32]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3, 32]). size mismatch for unet.u.conv.2.weight: copying a param with shape torch.Size([2, 2, 2, 32, 48]) from checkpoint, the shape in current model is torch.Size([48, 2, 2, 2, 32]). size mismatch for unet.u.u.blocks.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 48, 48]) from checkpoint, the shape in current model is torch.Size([48, 3, 3, 3, 48]). size mismatch for unet.u.u.blocks.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 48, 48]) from checkpoint, the shape in current model is torch.Size([48, 3, 3, 3, 48]). size mismatch for unet.u.u.blocks.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 48, 48]) from checkpoint, the shape in current model is torch.Size([48, 3, 3, 3, 48]). size mismatch for unet.u.u.blocks.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 48, 48]) from checkpoint, the shape in current model is torch.Size([48, 3, 3, 3, 48]). size mismatch for unet.u.u.conv.2.weight: copying a param with shape torch.Size([2, 2, 2, 48, 64]) from checkpoint, the shape in current model is torch.Size([64, 2, 2, 2, 48]). size mismatch for unet.u.u.u.blocks.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 64, 64]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3, 64]). size mismatch for unet.u.u.u.blocks.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 64, 64]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3, 64]). size mismatch for unet.u.u.u.blocks.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 64, 64]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3, 64]). size mismatch for unet.u.u.u.blocks.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 64, 64]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3, 64]). size mismatch for unet.u.u.u.conv.2.weight: copying a param with shape torch.Size([2, 2, 2, 64, 80]) from checkpoint, the shape in current model is torch.Size([80, 2, 2, 2, 64]). size mismatch for unet.u.u.u.u.blocks.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 80, 80]) from checkpoint, the shape in current model is torch.Size([80, 3, 3, 3, 80]). size mismatch for unet.u.u.u.u.blocks.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 80, 80]) from checkpoint, the shape in current model is torch.Size([80, 3, 3, 3, 80]). size mismatch for unet.u.u.u.u.blocks.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 80, 80]) from checkpoint, the shape in current model is torch.Size([80, 3, 3, 3, 80]). size mismatch for unet.u.u.u.u.blocks.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 80, 80]) from checkpoint, the shape in current model is torch.Size([80, 3, 3, 3, 80]). size mismatch for unet.u.u.u.u.conv.2.weight: copying a param with shape torch.Size([2, 2, 2, 80, 96]) from checkpoint, the shape in current model is torch.Size([96, 2, 2, 2, 80]). size mismatch for unet.u.u.u.u.u.blocks.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 96, 96]) from checkpoint, the shape in current model is torch.Size([96, 3, 3, 3, 96]). size mismatch for unet.u.u.u.u.u.blocks.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 96, 96]) from checkpoint, the shape in current model is torch.Size([96, 3, 3, 3, 96]). size mismatch for unet.u.u.u.u.u.blocks.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 96, 96]) from checkpoint, the shape in current model is torch.Size([96, 3, 3, 3, 96]). size mismatch for unet.u.u.u.u.u.blocks.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 96, 96]) from checkpoint, the shape in current model is torch.Size([96, 3, 3, 3, 96]). size mismatch for unet.u.u.u.u.u.conv.2.weight: copying a param with shape torch.Size([2, 2, 2, 96, 112]) from checkpoint, the shape in current model is torch.Size([112, 2, 2, 2, 96]). size mismatch for unet.u.u.u.u.u.u.blocks.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 112, 112]) from checkpoint, the shape in current model is torch.Size([112, 3, 3, 3, 112]). size mismatch for unet.u.u.u.u.u.u.blocks.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 112, 112]) from checkpoint, the shape in current model is torch.Size([112, 3, 3, 3, 112]). size mismatch for unet.u.u.u.u.u.u.blocks.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 112, 112]) from checkpoint, the shape in current model is torch.Size([112, 3, 3, 3, 112]). size mismatch for unet.u.u.u.u.u.u.blocks.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 112, 112]) from checkpoint, the shape in current model is torch.Size([112, 3, 3, 3, 112]). size mismatch for unet.u.u.u.u.u.deconv.2.weight: copying a param with shape torch.Size([2, 2, 2, 112, 96]) from checkpoint, the shape in current model is torch.Size([96, 2, 2, 2, 112]). size mismatch for unet.u.u.u.u.u.blocks_tail.block0.i_branch.0.weight: copying a param with shape torch.Size([1, 1, 1, 192, 96]) from checkpoint, the shape in current model is torch.Size([96, 1, 1, 1, 192]). size mismatch for unet.u.u.u.u.u.blocks_tail.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 192, 96]) from checkpoint, the shape in current model is torch.Size([96, 3, 3, 3, 192]). size mismatch for unet.u.u.u.u.u.blocks_tail.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 96, 96]) from checkpoint, the shape in current model is torch.Size([96, 3, 3, 3, 96]). size mismatch for unet.u.u.u.u.u.blocks_tail.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 96, 96]) from checkpoint, the shape in current model is torch.Size([96, 3, 3, 3, 96]). size mismatch for unet.u.u.u.u.u.blocks_tail.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 96, 96]) from checkpoint, the shape in current model is torch.Size([96, 3, 3, 3, 96]). size mismatch for unet.u.u.u.u.deconv.2.weight: copying a param with shape torch.Size([2, 2, 2, 96, 80]) from checkpoint, the shape in current model is torch.Size([80, 2, 2, 2, 96]). size mismatch for unet.u.u.u.u.blocks_tail.block0.i_branch.0.weight: copying a param with shape torch.Size([1, 1, 1, 160, 80]) from checkpoint, the shape in current model is torch.Size([80, 1, 1, 1, 160]). size mismatch for unet.u.u.u.u.blocks_tail.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 160, 80]) from checkpoint, the shape in current model is torch.Size([80, 3, 3, 3, 160]). size mismatch for unet.u.u.u.u.blocks_tail.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 80, 80]) from checkpoint, the shape in current model is torch.Size([80, 3, 3, 3, 80]). size mismatch for unet.u.u.u.u.blocks_tail.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 80, 80]) from checkpoint, the shape in current model is torch.Size([80, 3, 3, 3, 80]). size mismatch for unet.u.u.u.u.blocks_tail.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 80, 80]) from checkpoint, the shape in current model is torch.Size([80, 3, 3, 3, 80]). size mismatch for unet.u.u.u.deconv.2.weight: copying a param with shape torch.Size([2, 2, 2, 80, 64]) from checkpoint, the shape in current model is torch.Size([64, 2, 2, 2, 80]). size mismatch for unet.u.u.u.blocks_tail.block0.i_branch.0.weight: copying a param with shape torch.Size([1, 1, 1, 128, 64]) from checkpoint, the shape in current model is torch.Size([64, 1, 1, 1, 128]). size mismatch for unet.u.u.u.blocks_tail.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 128, 64]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3, 128]). size mismatch for unet.u.u.u.blocks_tail.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 64, 64]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3, 64]). size mismatch for unet.u.u.u.blocks_tail.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 64, 64]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3, 64]). size mismatch for unet.u.u.u.blocks_tail.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 64, 64]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3, 64]). size mismatch for unet.u.u.deconv.2.weight: copying a param with shape torch.Size([2, 2, 2, 64, 48]) from checkpoint, the shape in current model is torch.Size([48, 2, 2, 2, 64]). size mismatch for unet.u.u.blocks_tail.block0.i_branch.0.weight: copying a param with shape torch.Size([1, 1, 1, 96, 48]) from checkpoint, the shape in current model is torch.Size([48, 1, 1, 1, 96]). size mismatch for unet.u.u.blocks_tail.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 96, 48]) from checkpoint, the shape in current model is torch.Size([48, 3, 3, 3, 96]). size mismatch for unet.u.u.blocks_tail.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 48, 48]) from checkpoint, the shape in current model is torch.Size([48, 3, 3, 3, 48]). size mismatch for unet.u.u.blocks_tail.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 48, 48]) from checkpoint, the shape in current model is torch.Size([48, 3, 3, 3, 48]). size mismatch for unet.u.u.blocks_tail.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 48, 48]) from checkpoint, the shape in current model is torch.Size([48, 3, 3, 3, 48]). size mismatch for unet.u.deconv.2.weight: copying a param with shape torch.Size([2, 2, 2, 48, 32]) from checkpoint, the shape in current model is torch.Size([32, 2, 2, 2, 48]). size mismatch for unet.u.blocks_tail.block0.i_branch.0.weight: copying a param with shape torch.Size([1, 1, 1, 64, 32]) from checkpoint, the shape in current model is torch.Size([32, 1, 1, 1, 64]). size mismatch for unet.u.blocks_tail.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 64, 32]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3, 64]). size mismatch for unet.u.blocks_tail.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 32, 32]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3, 32]). size mismatch for unet.u.blocks_tail.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 32, 32]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3, 32]). size mismatch for unet.u.blocks_tail.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 32, 32]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3, 32]). size mismatch for unet.deconv.2.weight: copying a param with shape torch.Size([2, 2, 2, 32, 16]) from checkpoint, the shape in current model is torch.Size([16, 2, 2, 2, 32]). size mismatch for unet.blocks_tail.block0.i_branch.0.weight: copying a param with shape torch.Size([1, 1, 1, 32, 16]) from checkpoint, the shape in current model is torch.Size([16, 1, 1, 1, 32]). size mismatch for unet.blocks_tail.block0.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 32, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 32]). size mismatch for unet.blocks_tail.block0.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 16, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 16]). size mismatch for unet.blocks_tail.block1.conv_branch.2.weight: copying a param with shape torch.Size([3, 3, 3, 16, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 16]). size mismatch for unet.blocks_tail.block1.conv_branch.5.weight: copying a param with shape torch.Size([3, 3, 3, 16, 16]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3, 16]). size mismatch for linear_semantics.weight: copying a param with shape torch.Size([2, 32]) from checkpoint, the shape in current model is torch.Size([10, 32]). size mismatch for linear_semantics.bias: copying a param with shape torch.Size([2]) from checkpoint, the shape in current model is torch.Size([10]).

@zuixiaosanlang
Copy link

@happyfox-xie
image
change 10 to 2
can solve this problem

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

No branches or pull requests

2 participants