Files
wehub-resource-sync c8a779b1bb
Docker Image CI / build-ubuntu2004 (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:36:55 +08:00
..

Creating An ONNX Model

Introduction

ONNX GraphSurgeon includes an IR (intermediate representation) that can be exported to ONNX. Additionally, the IR exposes a simple API so that it is possible to build graphs manually.

This example creates an ONNX model containing a single GlobalLpPool node.

Running the example

Generate the model and save it to test_globallppool.onnx by running:

python3 example.py

The generated model will look like this:

../resources/01_test_globallppool.onnx.png