⚙️Open Neural Network Exchange (ONNX)
Also known as ONNX, ONNX Format, .onnx File
An open file type for AI models. A model made in one tool runs in others.
Think of it like
It is like saving a story as a PDF. It opens the same way on almost any device.
Example
Emma trains a photo model in PyTorch and saves it as ONNX. She runs that same file in her web app and her phone app.
Why it matters
The tool that trains best is often not the one that runs best. ONNX lets you pick each one apart.
Definition
Example code
python
torch.onnx.export(model, sample_input, "model.onnx")Common mistake
Key takeaways
- 1One file. The whole model in a single .onnx file.
- 2Runs anywhere. Servers, phones, browsers and many chips.
- 3Open standard. Not owned by one company.