fastmachinelearning / qonnx

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

channels_last transformation support for branching models #100

Open nghielme opened 8 months ago

nghielme commented 8 months ago

I am working with a UNet model in ONNX format and I needed to move channels from first to last. I tried using the following pass https://github.com/fastmachinelearning/qonnx/blob/main/src/qonnx/transformation/channels_last.py but at the moment it seems it does not support branching model. I also noticed that something similar has been implemented in hls4ml, exploiting configuration parameters coming from PyTorch, https://github.com/fastmachinelearning/hls4ml/blob/fcd9c58d977ee7684e21d81cc13f124c9aa4209c/hls4ml/model/optimizer/passes/convert_to_channels_last.py Is there any ongoing work on this? If not, if anyone has any kind of guideline/slides on how to support this feature I would be happy to contribute.