-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tflite backend #93
Open
neil-tan
wants to merge
125
commits into
develop
Choose a base branch
from
tflite_backend
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Tflite backend #93
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- updated Pipfile.lock
neil-tan
force-pushed
the
tflite_backend
branch
from
November 29, 2019 07:09
58f328b
to
36f1fe3
Compare
next: op code
quantization param for intermediate tensors?
- layout the test mechanism - making third_party/tflite all importable
- modified test graph * the input tensor not showing up in the print-graph
tflite_exporter.py:174
- included flatbuffers python in utensor_cgen/third_party/flatbuffers - added file_identifier : TFL3 - changed schema version field to : 3 - bugfix in the confteest.py test_write.py WIP
…atbuffer python bindings
hybrid quantization failed
- add op the first tensor still fails
F/tflite parser
- Fix bugs (dropout transformer)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Install
Using a virtual environment is a good idea.
Running Test
pytest -s tests/tflm
This is semi-working for:
input0 = [1,1,1,1].tranpose #set at the run time
input1 = [2,4,6,8].tranpose
weight = [10,20,30,40]
bias = [7]
add_output = ADD(input0, input1)
out = FC(add_output, weight, bias)
out == 707
Notes
Unexplained behaviors: when the first tensor in the subgraph,
input0
, is not set at the runtime, the tensor is then initialized to undefined values instead of values contained in FlatBuffers. See here.@dboyliao Can use some input on the python coding style/design patterns. Keep in mind, I barely got this to work. Perhaps using registry/factory pattern for additional op supports? Imports are a mess.
The files to look at are:
There are 3 types of quantization flows in TFLM:
Hybrid quantization seems broken atm. uTensor-cli require additional work to support offline quantization. So, no quantization is the way to go.
Useful Docs: