ONNX (Open Neural Network Exchange)

ONNX (Open Neural Network Exchange) is an open-source format that provides a common way to represent machine learning models, letting you train in one framework and deploy in another. An ONNX file (.onnx) stores the model's computational graph (operations like convolution, batch normalization, and ReLU as nodes, with tensor data flowing along edges) plus the trained weights.

The main benefit is portability. You can export a PyTorch model with torch.onnx.export(), then run it through ONNX Runtime on completely different hardware without rewriting code. ONNX Runtime (maintained by Microsoft) supports CPUs via OpenMP/MKL, NVIDIA GPUs via CUDA and TensorRT, Intel hardware via OpenVINO, Apple Silicon via CoreML, and browsers via WebAssembly. It applies graph-level optimizations automatically: fusing Conv+BN+ReLU into a single kernel, constant folding, and mixed-precision execution (FP16/INT8).

In computer vision workflows, ONNX is the standard export target for trained detection and segmentation models headed for production deployment. The typical path is: train in PyTorch, export to ONNX, optimize with TensorRT (NVIDIA) or OpenVINO (Intel) or CoreML (Apple) for target hardware, deploy. This separation of training framework from inference runtime is what makes ONNX valuable. Datature Nexus supports ONNX export for trained models.

Get Started Now

Get Started using Datature’s platform now for free.