onnx-connx is a tool which converts ONNX to CONNX model. And onnx-connx is also a NumPy ONNX Runtime implementation for CONNX. We don't recommend to use onnx-connx as an ONNX Runtime for NumPy is very (very) slow.
pip install git+https://github.com/semihlab/onnx-connx
python -m onnx\_connx --help # to get help message
python -m onnx\_connx [onnx model] # to convert onnx to connx
- python3
- onnx # python package, to run onnx2connx converter
- protobuf-compiler # to run bin/dump utility
- tabulate # python package, to run test cases
- pytest-parallel # python package, to run test cases
$ sudo apt install python3 python3-pip python3-venv
$ python3 -m pip install --user virtualenv
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip
$ pip install onnx
pip install git+file:///[path-to-onnx-connx]
onnx-connx$ bin/dump [onnx path] # This utility will dump onnx or pb to text using protoc
onnx-connx$ make test
onnx-connx$ make convert-test [ONNX_HOME=[onnx install dir]] [CONNX_HOME=[connx source dir]] # ONNX_HOME and CONNX_HOME can be omitted
onnx-connx$ bin/convert [onnx test case path] [connx test case path]
connx backend will compile the ONNX to CONNX and run it using NumPy operators.
python -m onnx_connx.backend [onnx model] [[input tensor] ...]
onnx-connx$ cd examples
onnx-connx/examples$ ./download.sh
onnx-connx/examples$ cd ..
onnx-connx$ python -m onnx_connx.backend examples/mnist/model.onnx examples/mnist/input_0.pb
See CONTRIBUTING.md
CONNX is licensed under GPLv3. See LICENSE