fastmachinelearning / qonnx

QONNX: Arbitrary-Precision Quantized Neural Networks in ONNX
https://qonnx.readthedocs.io/
Apache License 2.0
124 stars 39 forks source link

Add resize to change_3d_tensors_to_4d transformation #125

Open klassen9 opened 3 months ago

klassen9 commented 3 months ago

This PR adds resize to the change_3d_tensors_to_4d transformation. The implementation supports resize version 10 up to 19.

Version 10 only supports scales as an input, other than the input tensor.

Version 11 up to 19 additionally support the roi and sizes inputs. sizes and scales are mutually exclusive. The Problem is that different versions have a different understanding of how to mark an input as unused. As an example:

I am thus checking if scales or sizes exist by checking if they are None or are empty. None is returned by model.get_initializer() if the input is an empty string in the input list.

klassen9 commented 3 months ago

After deliberation with @fpjentzsch we decided to disallow the use of the ROI input and the axes attribute for the Resize operator.