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

problems of different stride=(1, 2) in max pooling layer #28

Open yongjingli opened 5 years ago

yongjingli commented 5 years ago

hi, I suffer the problem is that I use different stride=(1, 2) in max pooling layer, which is not support in pytorch2caffe: image

wuyong139 commented 5 years ago

I also suffer this problem, and I modify the layer_param.py/ pool_param function: pool_param.stride_h = stride[0] pool_param.stride_w = stride[1] pool_param.kernel_h = kernel[0] pool_param.kernel_w = kernel[1]

lvZic commented 3 years ago

I also suffer this problem, and I modify the layer_param.py/ pool_param function: pool_param.stride_h = stride[0] pool_param.stride_w = stride[1] pool_param.kernel_h = kernel[0] pool_param.kernel_w = kernel[1]

I wonder if this change would work in case kernel_w != kernel_h, although it compiled successfully. Because there is nothing about "# TODO w,h different kernel, stride and padding" in python_to_caffe.py line._pool() line 213