qonnx icon indicating copy to clipboard operation
qonnx copied to clipboard

channels_last transformation support for branching models

Open nghielme opened this issue 1 year ago • 1 comments

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.

nghielme avatar Feb 14 '24 15:02 nghielme

Just to keep this issue updated, the recently-merged PR #149 should be able to do channels-last conversion for branching topologies, but U-Nets with Resize nodes and similar probably need more feature development on top.

maltanar avatar Dec 15 '24 20:12 maltanar