ONNX to NNOIR Converter
Project description
nnoir-onnx
nnoir-onnx is a converter from ONNX model to NNOIR model.
Install
From PyPI:
pip install nnoir-onnx
From Dockerhub:
docker pull idein/nnoir-tools:20230718
Example
wget https://www.cntk.ai/OnnxModels/mnist/opset_7/mnist.tar.gz
tar xvzf mnist.tar.gz
onnx2nnoir -o model.nnoir mnist/model.onnx
With docker:
docker run --rm -it -u $UID:$GID -v $(pwd):/work idein/nnoir-tools:20230718 onnx2nnoir --graph_name "mobilenet" -o mobilenetv2-1.0.nnoir mobilenetv2-1.0.onnx
Supported ONNX Operators
- Add
- AveragePool
- BatchNormalization
scale,B,mean, andvarmust be"constant"
- Clip
- must be opset version 6 or 11
- if opset version is 11
maxmust be"constant"
minmust be 0
- Concat
- Conv
- Cos
- Div
- 1st input must not be
"constant"
- 1st input must not be
- Dropout
- equivalent identity function
- Elu
- Exp
- Flatten
- Gemm
- GlobalAveragePool
- HardSigmoid
- HardSwish
- LeakyRelu
- LRN
- LSTM
- only
seq_length == 1 directionmust be forward- Supported
activationsare belowSigmoidTanhRelu
- Not support
clipandinput_forget
- only
- MatMul
- MaxPool
ceil_mode = 1is not supporteddilationsis not supported
- Mul
- Pad
modemust be"constant"
- PRelu
slopemust be"constant"and a single value tensor
- ReduceMean
- ReduceSum
- Relu
- Reshape
- Resize
- must be from opset version >= 11
modemust be"linear"or"nearest"nearest_modemust be"floor"coordinate_transformation_modemust be either"pytorch_half_pixel"or"align_corners"for"linear"modecoordinate_transformation_modemust be either"asymmetric"for"nearest"mode
- Sigmoid
- Sin
- Softmax
- Split
- must be from opset version >= 13
- Second optional parameter
splitis not supported
- Squeeze
- Sub
- 1st input must not be
"constant"
- 1st input must not be
- Sum
- 2 inputs
- Tan
- Tanh
- Transpose
- Unsqueeze
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nnoir_onnx-1.2.0.tar.gz
(19.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nnoir_onnx-1.2.0.tar.gz.
File metadata
- Download URL: nnoir_onnx-1.2.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.17 Linux/5.15.0-1039-aws
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a5446438ef8c2a2376dfe993bd5b1fccf0170a4723c661f4eb2341c42c7dae7
|
|
| MD5 |
0c84da39df4ea78b05627364bab731a6
|
|
| BLAKE2b-256 |
5632828273b6dd774fb26c795a3fda25ac90e695c202269c5ccf37ddc8c87224
|
File details
Details for the file nnoir_onnx-1.2.0-py3-none-any.whl.
File metadata
- Download URL: nnoir_onnx-1.2.0-py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.17 Linux/5.15.0-1039-aws
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
422144643b82d53f121ca402696e7414d744b01c9c8301f09e17e9b2ea92cc15
|
|
| MD5 |
46e759523ea1607defcec1b46a7c9e39
|
|
| BLAKE2b-256 |
43824dd5b69b417f22192aeb9728fad65de75a5f0746d586bdc12328f299b754
|