-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f19e3db
commit 23ecd05
Showing
4 changed files
with
441 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## TFLite2TF | ||
|
||
A utility for model conversion between TFLite and Tensorflow SavedModel. | ||
|
||
### Supported operators | ||
- PAD | ||
- ADD | ||
- RESIZE_BILINEAR | ||
- RESHAPE | ||
- CONV_2D | ||
- AVERAGE_POOL_2D | ||
- DEPTHWISE_CONV_2D | ||
- FULLY_CONNECTED | ||
- DEPTH_TO_SPACE | ||
- TRANSPOSE_CONV | ||
- SLICE | ||
- RELU | ||
|
||
### Usage | ||
```py | ||
import sys | ||
import subprocess | ||
from tflite2tf import parse_tflite | ||
|
||
parse_tflite('test.tflite') | ||
|
||
# It will dump a script `generate_tf_savedmodel.py` in the current directory. | ||
subprocess.call([sys.executable, 'generate_tf_savedmodel.py']) | ||
|
||
# And then, the saved model will be saved in the "saved_model" directory. | ||
``` | ||
|
||
### Limitations | ||
1. It may not work if the weights are shared between certain ops | ||
2. The generated model may not be optimal |
Oops, something went wrong.