qonnx.util.cleanup (module)
- qonnx.util.cleanup.cleanup(in_file, *, out_file=None)
Execute a set of graph transformations to clean-up the given ONNX file.
- Parameters
in_file – Filename for the input ONNX model
out_file – If set, filename for the output ONNX model. Set to in_file with _clean suffix otherwise.
- qonnx.util.cleanup.cleanup_model(model)
Execute the transformations for the cleanup function on a model level. This allows the reuse of the cleanup transformations, without needing to read/write the model from/to disk.
- Parameters
model – A raw QONNX model from as example Brevitas.
- Return model_clean
The cleaned model
- qonnx.util.cleanup.main()