Skip to content

tfujiwar/onnx-tensorflow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tensorflow Backend for ONNX

Build Status

To install:

Firstly install ONNX which cannot be installed by pip unless protoc is available.

Then, run pip install onnx-tf

To test:

For backend, run python -m unittest discover test/backend.

Example:

In this example, we will define and run a Relu node and print the result. This example is available as a python script at example/relu.py .

from onnx_tf.backend import run_node
from onnx import helper

node_def = helper.make_node("Relu", ["X"], ["Y"])
output = run_node(node_def, [[-0.1, 0.1]])
print(output["Y"])

The result is [ 0. 0.1]

Development Install:

  • Install ONNX
  • Run git clone git@github.com:onnx/onnx-tensorflow.git && cd onnx-tensorflow
  • Run pip install -e .
  • Development follows conventions here

Folder Structure:

  • onnx_tf main source code file.
  • test test files.

Code Standard:

  • Install pylint:
pip install pylint
wget -O /tmp/pylintrc https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/tools/ci_build/pylintrc
  • Check format:
pylint --rcfile=/tmp/pylintrc myfile.py

Documentation Standard:

http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html

Test Help:

https://docs.python.org/2/library/unittest.html

Authors:

Arpith Jacob (IBM Research)

Tian Jin (IBM Research)

Gheorghe-Teodor Bercea (IBM Research)

About

Tensorflow Backend for ONNX

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.4%
  • Shell 2.6%