microsoft / MMdnn

MMdnn is a set of tools to help users inter-operate among different deep learning frameworks. E.g. model conversion and visualization. Convert models between Caffe, Keras, MXNet, Tensorflow, CNTK, PyTorch Onnx and CoreML.
MIT License
5.78k stars 968 forks source link

Bug found in avg_pool2d when convert mxnet 2 pytorch(may be) #909

Closed bendanzzc closed 3 years ago

bendanzzc commented 3 years ago

when I convert mxnet inceptionBN to pytorch, I found the high precision error between origin mxnet model and converted pytorch model. and then I found that the generated pytorch model file has the line avg_pool_3a_pool = F.avg_pool2d(pool2, kernel_size=(3, 3), stride=(1, 1), padding=(1,), ceil_mode=False, count_include_pad=False). I change the count_include_pad to True and the precision is correct. Is it the bug or I just take the wrong convert steps?

cookieli commented 3 years ago

I think it's a bug. Now mmdnn can't support count_include_pad attribute, we will fix it soon!!