ONNX Import & Export (Expanded)
~120 new ONNX op implementations including Microsoft LLM contrib ops, ONNX ML domain classifiers, quantized inference ops, and bidirectional SameDiff-to-ONNX export
ONNX Import & Export (Expanded)
1. Scope of Expansion
2. Maven Setup
<!-- Core ONNX import and export -->
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-samediff-import-onnx</artifactId>
<version>${dl4j.version}</version>
</dependency>
<!-- Pipeline SPI loader (optional) -->
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>samediff-pipeline-onnx</artifactId>
<version>${dl4j.version}</version>
</dependency>3. Standard ONNX Ops (Newly Added)
Pooling
Op
Description
Activation Functions
Op
Description
Convolution Variants
Op
Description
Normalization
Op
Description
Recurrent Layers
Op
Description
Loss Functions
Op
Description
Image Preprocessing
Op
Description
Advanced Indexing
Op
Description
Sequence, Control Flow, and Misc
Op
Description
Reductions
Object Detection
Op
Description
Signal Processing
Op
Description
4. Microsoft Contrib Ops (com.microsoft)
com.microsoft)Op
Description
5. ONNX ML Domain Ops (ai.onnx.ml)
ai.onnx.ml)Preprocessing
Op
Description
Classical ML Classifiers and Regressors
Op
Description
6. Quantized Inference Ops
Op
Description
7. Updated Ops and Opset Compatibility
8. ONNX Export Pipeline
Classes
Class
Role
OnnxExportConfig
Export to File
Export to OutputStream
Export with Training State
Custom PostExportHook
9. Pipeline SPI Module
10. Import Examples
Vision Model (NCHW)
LLM with Microsoft Contrib Ops (LLaMA / Mistral)
scikit-learn Pipeline (ONNX ML Ops)
Quantized INT8 Model (BERT)
11. Export Examples
Train in SameDiff, Export to ONNX
Import, Fine-Tune, Re-Export with Checkpoint
Large Model with External Data
Troubleshooting
Last updated
Was this helpful?