onnx-tensorflow
onnx-tensorflow copied to clipboard
Issue with negative padding not working
Describe the bug
I was going over earlier PRs, and I noticed negative padding working was pushed to the repository for onnx-tensorflow. The PR I was referring to is this one.
However, when I tried to run an ONNX model I had, I received an error that:
Paddings must be non-negative for ...
Also, I would like to know that if this warning in the inference has anything to do with the error:
2021-11-27 03:24:02,944 - onnx-tf - WARNING - Using the pooling op in compatibility mode. This means your graph cannot be serialized.
To Reproduce
No specific steps, but a simple run command fails for the model after I've run onnx_tf.backend.prepare on the model code. It could be a nuance with the model, but I would like to know if there is any way to fix the negative padding issue (since the docs/past issues seem to suggest that negative padding should work without issues) from onnx-tensorflow itself without having to mess with the model ONNX conversion.
Python V3, latest onnx-tensorflow from master.
Sorry for late response. The PR you are referring to is for the pad operator. The unit tests indicate it is working as expected including negative padding. So I am guessing the error is coming from some other operator. For example most pooling operators support paddings. It would be helpful to include additional logs/error message to pinpoint which operator caused the issue.
As far as the warning, it means you can convert an onnx model in memory and run the model using Tensorflow APIs, but the converted Tensorflow graph cannot be saved as a file for later execution.