8000 GitHub - edoffagne/utensor_cgen: C++ code generator for uTensor
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

edoffagne/utensor_cgen

 
 

Repository files navigation

Installation (Python 2 & 3)

  • installation with setup.py
python setup.py install
  • installation with pip
pip install utensor_cgen

Develop Environment

We use pipenv to setup the develop environment.

You can go to this repo for detail information about pipenv.

Setup with pipenv

  1. # pipenv install -d
  2. # pipenv shell
    • this will spawn a subshell and activate the virtual environment for you
    • You should be able to use the cli now

Example

Please refer to tests/deep_mlp for detailed example

User Guild

Following steps are a general guild for user how to porting a TensorFlow protobuf file into a uTensor implementation:

  1. Freeze and quantize your graph
  2. install utensor_cgent
    • run python3 setupt.py install
  3. run utensor-cli quantized_graph.pb, where quantized_graph.pb is the output pb file you get from step 1
    • run utensor-cli -h for help

TODOs

  1. (done) Freezed graph protobuff parser
  2. (done)Tensor snippets for uTensor
  3. (done) Add template engine for richer flexibility
  4. (done?) core code generator implementation
    • We need some refatoring, PRs are welcomed!
  5. type alias in C/C++
    • ex: use uint8_t or unsigned char?
    • a lot more about this....
  6. (done) MANIFAST.in for the setup.py
  7. Relation among snippets/containers
    • shared template variables? (headers, shared placeholders...etc)
  8. Better configuration schema
    • json
    • yaml
    • or ?

About

C++ code generator for uTensor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 58.1%
  • Jupyter Notebook 26.0%
  • C++ 15.4%
  • Other 0.5%
  • 0