GithubHelp home page GithubHelp logo

jisuchoi01 / onnx-connx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tsnlab/onnx-connx

0.0 0.0 0.0 45.71 MB

ONNX to CONNX Converter

License: GNU General Public License v3.0

Python 86.41% Makefile 12.24% Shell 1.35%

onnx-connx's Introduction

ONNX to CONNX Converter

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.

For users

Install onnx-connx via pip

pip install git+https://github.com/semihlab/onnx-connx

Convert ONNX to CONNX model

python -m onnx\_connx --help        # to get help message
python -m onnx\_connx [onnx model]  # to convert onnx to connx

For developers

Prepare development environments

  • 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

Debug installation

pip install git+file:///[path-to-onnx-connx]

Dump onnx to text

onnx-connx$ bin/dump [onnx path]  # This utility will dump onnx or pb to text using protoc

Test

Run test

onnx-connx$ make test

Convert all test cases that connx supports

onnx-connx$ make convert-test [ONNX_HOME=[onnx install dir]] [CONNX_HOME=[connx source dir]] # ONNX_HOME and CONNX_HOME can be omitted

Convert individual test case

onnx-connx$ bin/convert [onnx test case path] [connx test case path]

Run connx backend

connx backend will compile the ONNX to CONNX and run it using NumPy operators.

python -m onnx_connx.backend [onnx model] [[input tensor] ...]

Run MNIST example

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

Contribution

See CONTRIBUTING.md

License

CONNX is licensed under GPLv3. See LICENSE

onnx-connx's People

Contributors

semihlab avatar shkim-neo avatar makerj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.