MPolaris / onnx2tflite

Tool for onnx->keras or onnx->tflite. Hope this tool can help you.
Apache License 2.0
507 stars 41 forks source link

Transposed convolution output shape #20

Closed AlexSS1001 closed 1 year ago

AlexSS1001 commented 1 year ago

Hi,

In the transposed convolution source code, the output shape is not the same as Pytorch, for same parameters. In order to solve this, I have moved the padding after self.conv call. This is for a tranposed convolution with kernel size [4, 4] and strides [2, 2]. Can you please recheck your conversion code on other tranposed convolutions?

https://github.com/MPolaris/onnx2tflite/blob/main/layers/conv_layers.py#L37

MPolaris commented 1 year ago

Yes, TFConvTranspose is problematic, only a few kinds of situation are checked. I have no plan to fix bug for TFConvTranspose in recently, if your code can make TFConvTranspose work better, welcome PR.

MPolaris commented 1 year ago

Fixed