### Build ONNX Optimizer from Source Source: https://github.com/onnx/optimizer/blob/main/README.md Clone the repository, navigate to the directory, and install the package in editable mode. Ensure protobuf is installed beforehand. ```bash git clone --recursive https://github.com/onnx/optimizer onnxoptimizer cd onnxoptimizer pip3 install -e . ``` -------------------------------- ### Install ONNX Optimizer from PyPI Source: https://github.com/onnx/optimizer/blob/main/README.md Install the onnxoptimizer package using pip. Upgrade pip if you encounter issues. ```bash pip3 install onnxoptimizer ``` ```bash pip3 install -U pip ``` -------------------------------- ### ONNX Optimizer Command-Line Help Source: https://github.com/onnx/optimizer/blob/main/README.md Display help information for the onnxoptimizer command-line API, showing available arguments and their descriptions. ```bash # python3 -m onnxoptimizer -h usage: python -m onnxoptimizer input_model.onnx output_model.onnx onnxoptimizer command-line api optional arguments: -h, --help show this help message and exit --print_all_passes print all available passes --print_fuse_elimination_passes print all fuse and elimination passes -p [PASSES ...], --passes [PASSES ...] list of optimization passes name, if no set, fuse_and_elimination_passes will be used --fixed_point fixed point ``` -------------------------------- ### Run ONNX Optimizer from Command Line Source: https://github.com/onnx/optimizer/blob/main/README.md Optimize an ONNX model using the command-line interface. Specify input and output model paths. ```bash python -m onnxoptimizer input_model.onnx output_model.onnx ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.