- with
setup.py
python setup.py install
- with
pip
pip install utensor_cgen
- with
pip
pip instal -e .[dev]
- with
pipenv
$ PIPENV_VENV_IN_PROJECT=1 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
You can go to this repo for detail information about pipenv
.
- If you have trouble with installation using
pipenv
, tryPIPENV_VENV_IN_PROJECT=1 pipenv install -d --skip-lock
- there is known issue of
pip
andpipenv
, plz refer to this issue for detail- short answer: downgrade to
pip==18.0
may help :)
- short answer: downgrade to
- Tensorflow requires
setuptools<=39.1.0
(the latest is40.4.3
by the time this README is writen)- plz downgrade to
setuptools==39.1.0
- my recommendation is to use
virtualenv
- plz downgrade to
Show all nodes and detailed information of given pb file.
Run utensor-cli show --help
for detailed information.
Convert given pb file into cpp/hpp files.
Note that --output-nodes
is required options. It's the names of nodes you want to output, seperated by comma if there are many.
In graph theory terminology, they are leaf
nodes of your graph.
Run utensor-cli convert --help
for detailed information.
Please refer to tests/deep_mlp for detailed example
Following steps are a general guild for user how to porting a TensorFlow
protobuf file into a uTensor
implementation:
- install
utensor_cgent
- run
python3 setupt.py install
- run
- run
utensor-cli convert --output-nodes='NODE,NODE,...' graph.pb
- run
utensor-cli -h
for help - the
graph.pb
is the pb file of original graph (not quantized)
- run
- If you want to see what ops/nodes are in the pb file, you can run
utensor-cli show <pbfile>
- follow the steps in setup section
- run
make tests
- Or you can use
pipenv run pytest tests
instead
- Or you can use
- If you want to use dropout with placeholders for the
keep_prob
, you have to name thekeep_prob
placeholder by any name that starts with "keep_prob".- You can still use any input tensor with name starts with "keep_prob" as long as it's not the output tensor of a placeholder node.
- You can't wrap
dropout
in anynamescope
- (done?) core code generator implementation
- We need some refactoring, PRs are welcomed!
- type alias in C/C++
- ex: use
uint8_t
orunsigned char
? - a lot more about this....
- ex: use
- Relation among snippets/containers
- shared template variables? (headers, shared placeholders...etc)
- Better configuration schema
- json
- yaml
- or ?