qonnx.transformation.rebalance_conv (module)
- class qonnx.transformation.rebalance_conv.RebalanceIm2Col(extract_channels)
Bases:
qonnx.transformation.base.TransformationFor certain hardware that prefers channel parallelism over feature map spatial parallelism, it is possible to reshape the inputs to an Im2Col node to move some of the spatial dimension into the channels dimension. This transformation attempts to find such Im2Col nodes, adds a Reshape node in front and alters their kernel/stride sizes accordingly. See list of conditions checked in the implementation for a full list, but one example of rebalancing is provided in the unit test for this transformation (test_rebalance_conv.py)
- apply(model)