Skip to main content

onnx compiler

Project description

onnion

Installation

From PyPI:

$ pip3 install onnion

From Dockerhub:

docker pull idein/onnion:20221014

Usage

$ onnion ssd-10-post.onnx -o ssd_post_model.py
$ python
>>> from ssd_post_model import init_graph
>>> graph = init_graph()
>>> inputs = ... # List[np.array]
>>> outputs = graph.run(*inputs)

With docker:

$ docker run --rm -it -u $UID:$GID -v $(pwd):/work idein/onnion:20221014 ssd-10-post.onnx -o ssd_post_model.py

The order of the inputs and the outputs in the run method corresponds to the order of the inputs and the outputs in the onnx graph.

See also tutorial.

Development Guide

$ poetry install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onnion-0.8.1.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

onnion-0.8.1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page