deform_conv_pytorch
deform_conv_pytorch copied to clipboard
ValueError: cannot reshape array of size 18 into shape (1,128,1,1)
You did: N = offset.size(1) // 2, In that level the offset.size(1) is equal to 128 , and N suppuse to be the kernel size *2, means N=|R|
And I haven't change anything in the code...
Thanks.
I have the same issue, please help. Beside it is not clear that why out_channel is 18. Can you explain briefly? self.conv_offset = nn.Conv2d(in_channels=inC, out_channels=18, kernel_size=3, padding=padding, bias=None)
Size mismatch because of the linear layer... do a reshape or adaptive pooling or leave the linear layer out. have a look at this implementation: https://github.com/bkvie/Locally-Consistent-Deformable-Convolution
I have the same problem……