Closed zehuichen123 closed 4 years ago
I met this problem before. Adding this line may help.
I met this problem before. Adding this line may help.
Thanks! I will give it a try~
Hi, @zehuichen123, I have also run into the exactly same problem and tried the fix given by @PanJianning, but it seems that the fix doesn't work. Have you solved the problem? Thank you.
Hi, @zehuichen123, I have also run into the exactly same problem and tried the fix given by @PanJianning, but it seems that the fix doesn't work. Have you solved the problem? Thank you.
One possible solution would be to change sp = self.convs[0](spx[0])
into sp = self.convs[0](spx[0].contiguous())
and change sp = self.convs[i](sp)
into sp = self.convs[i](sp.contiguous())
I met this problem also with DCNv1. @hyz-xmaster's solution fixed both DCN version on my environment, so I sent PR.
Hi, I am trying to add DCNv2 on Res2Net backbone. Interestingly, I got an
RuntimeError: input tensor has to be contiguous
with batch size = 2 but when I set batch size = 1, the error was gone. This bug also didn't appear on DCNv1.