xxradon / PytorchToCaffe

Pytorch model to caffe model, supported pytorch 0.3, 0.3.1, 0.4, 0.4.1 ,1.0 , 1.0.1 , 1.2 ,1.3 .notice that only pytorch 1.1 have some bugs
MIT License
783 stars 224 forks source link

Adaptive_avg_pool2d转换失败 #112

Open Single430 opened 3 years ago

Single430 commented 3 years ago

你好,非常感谢您的项目! 但是我在代码中有看到Adaptive_avg_pool2d对应的op注册,不过在转换过程报一下错误:

TypeError: adaptive_avg_pool2d() takes 2 positional arguments but 4 were given

我知道是传的参数多了,看代码这里:

caffe_out = raw(input, kernel_size, stride, padding, ceil_mode=True)

应该如何修改呢? @xxradon @Guanmoyu

vmc-7645 commented 1 year ago

Replacing:

caffe_out = raw(input, kernel_size, stride, padding, ceil_mode=True)

With

caffe_out = raw(input, kernel_size)

Worked for me (in removing the error), however the model still didn't seem to work afterwards.