summaryrefslogtreecommitdiff
path: root/compiler/tfldump/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/tfldump/README.md')
-rw-r--r--compiler/tfldump/README.md67
1 files changed, 67 insertions, 0 deletions
diff --git a/compiler/tfldump/README.md b/compiler/tfldump/README.md
new file mode 100644
index 000000000..50d003f12
--- /dev/null
+++ b/compiler/tfldump/README.md
@@ -0,0 +1,67 @@
+# tfldump
+
+### What is this?
+
+tfldump is a tool that dumps binary tflite file into human readable text to console.
+
+tfldump is implemented with C++ not python. We can do the same thing much easier
+with python but this tool doesn't need to install TensorFlow python package.
+
+Schema for FlatBuffer used is from TensorFlow v1.12.0 release.
+
+### Design philosophy
+
+Make the code simple.
+
+### To do
+
+- Print weight values other than uint8_t
+- Add more operators
+
+### How to use
+
+Command argument format:
+```
+tfldump tflite_file
+```
+
+Example output of dump `readme.tflite` file
+```
+Dump: readme.tflite
+
+Operator Codes: [order] OpCodeName (OpCode Enum)
+[0] CONV_2D (code: 3)
+
+Buffers: B(index) (length) values, if any
+B(0) (0)
+B(1) (8) 0x94 0x5b 0x95 0xbf 0x42 0xa4 0x52 0xbf ...
+B(2) (4) 0xcd 0xcc 0x8c 0x3f
+
+Operands: T(tensor index) TYPE (shape) B(buffer index) OperandName
+T(0) FLOAT32 (1, 3, 3, 2) B(0) ifm
+T(1) FLOAT32 (1, 1, 1, 2) B(1) ker
+T(2) FLOAT32 (1) B(2) bias
+T(3) FLOAT32 (1, 3, 3, 1) B(0) ofm
+
+Operators: O(operator index) OpCodeName
+ Option(values) ... <-- depending on OpCode
+ I T(tensor index) OperandName <-- as input
+ O T(tensor index) OperandName <-- as output
+O(0) CONV_2D
+ Padding(1) Stride.W(1) Stride.H(1) Activation(0)
+ I T(0) ifm
+ I T(1) ker
+ I T(2) bias
+ O T(3) ofm
+
+Inputs/Outputs: I(input)/O(output) T(tensor index) OperandName
+I T(0) ifm
+I T(1) ker
+O T(3) ofm
+```
+
+### Dependency
+
+- safemain
+- stdex
+- FlatBuffers