qonnx.util.onnx (module)
- qonnx.util.onnx.nchw_to_nhwc(t, model, idx, reverse=False)
Converts between NCHW <-> NHWC layouts for tensor t by inserting a transpose. If reverse=False, t is assumed NCHW and we insert transpose to convert NCHW -> NHWC If reverse=True, t is assumed NHWC and we insert transpose to convert NHWC -> NCHW.
- qonnx.util.onnx.valueinfo_to_tensor(vi)
Creates an all-zeroes numpy tensor from a ValueInfoProto.