pytorch-deeplabv3plus-3D icon indicating copy to clipboard operation
pytorch-deeplabv3plus-3D copied to clipboard

resnet50_os16 forward pass error

Open AmeeraBawazir opened this issue 3 years ago • 6 comments

I'm trying to use resent 50 as an encoder, however it gives me this error. The code works fine with reset 18 and 34. Any idea ?

conv3d() received an invalid combination of arguments - got (Tensor, Parameter, NoneType, tuple, tuple, tuple, int), but expected one of:

  • (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, tuple of ints padding, tuple of ints dilation, int groups) didn't match because some of the arguments have invalid types: (Tensor, Parameter, NoneType, tuple, tuple, tuple, int)
  • (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, str padding, tuple of ints dilation, int groups) didn't match because some of the arguments have invalid types: (Tensor, Parameter, NoneType, tuple, tuple, tuple, int)

AmeeraBawazir avatar Apr 25 '22 08:04 AmeeraBawazir

I noticed this problem too, this problem is given by a double implementation of the class Bottleneck in resnet.py. Have you managed to solve that?

LucaLumetti avatar Apr 27 '22 13:04 LucaLumetti

I solved this issue! Thanks @LucaLumetti

JEpark-hutom avatar Jul 11 '22 05:07 JEpark-hutom

Hi, i'm a new coder in this field, could you please give some details? @JEpark-hutom

green-hand-shandong avatar Jan 20 '23 08:01 green-hand-shandong

@JEpark-hutom Can you help me with the fix?

hackkhai avatar May 25 '23 18:05 hackkhai

Bottleneck and BasicBlock should be divided into two groups for modification.

benj888 avatar Oct 27 '23 08:10 benj888

I solved this issue. You should put the if type(dilation) != type(1): dilation = 1 in the class Bottleneck.

zhuhaoran666 avatar Mar 20 '24 08:03 zhuhaoran666