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:20240208
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:20240208 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 be0
- Concat
- Conv
- Cos
- Div
- 1st input must not be
"constant"
- 1st input must not be
- Dropout
- equivalent identity function
- Elu
- Erf
- 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 supporteddilationsmust be array of 1.
- Mul
- Pad
modemust be"constant"
- Pow
- 2nd input must be
2.0
- 2nd input must be
- 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
- Slice
- Softmax
- Split
- Sqrt
- Squeeze
- Sub
- Sum
- 2 inputs
- Tan
- Tanh
- Transpose
- Unsqueeze
- Where
conditionmust be Constant valueconditionmust all true or all false- the input value not selected must be constant
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.6.0.tar.gz
(20.6 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.6.0.tar.gz.
File metadata
- Download URL: nnoir_onnx-1.6.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.9.23 Linux/6.8.0-1031-aws
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dd94124188885a8f96f5ad1559614facfd750a3fd3aeb7899d1db64d237565a
|
|
| MD5 |
19b2b2cf281bac8f847b18a5ef35249b
|
|
| BLAKE2b-256 |
24e9400c169d841258aeee3bcdda20c6bbf1ba7c507bc4bbdd8b0f93ce4cb4bf
|
File details
Details for the file nnoir_onnx-1.6.0-py3-none-any.whl.
File metadata
- Download URL: nnoir_onnx-1.6.0-py3-none-any.whl
- Upload date:
- Size: 43.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.9.23 Linux/6.8.0-1031-aws
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6fadd7b81f50b7a329053c09dd2708082dabbcf09de7ade81a4f48372f18d5
|
|
| MD5 |
7a9da8f397b414b3e718d4c95a78f8d6
|
|
| BLAKE2b-256 |
aab49f6b1af7fe4e927f2357e13f2c0cb3515bd051c081d6e2798d7b5f614e6d
|