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
.
pipenv
Setup with # pipenv install -d
# 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:
- Freeze and quantize your graph
- Freezing
- Quantization
- An alternative is to use the
quantize_graph.py
script - it should output one qunatized pb file, say
quantized_graph.pb
- An alternative is to use the
- install
utensor_cgent
- run
python3 setupt.py install
- run
- run
utensor-cli quantized_graph.pb
, wherequantized_graph.pb
is the output pb file you get from step 1- run
utensor-cli -h
for help
- run
TODOs
- (done) Freezed graph protobuff parser
- (done)Tensor snippets for
uTensor
- (done) Add template engine for richer flexibility
- (done?) core code generator implementation
- We need some refatoring, PRs are welcomed!
- type alias in C/C++
- ex: use
uint8_t
orunsigned char
? - a lot more about this....
- ex: use
- (done)
MANIFAST.in
for thesetup.py
- Relation among snippets/containers
- shared template variables? (headers, shared placeholders...etc)
- Better configuration schema
- json
- yaml
- or ?