LoginSignup
3
4

More than 5 years have passed since last update.

Structure visualization of Tensorflow Lite model files (.tflite)

Last updated at Posted at 2019-03-17

Environment

  • Ubuntu16.04 x86_64
  • Tensorflow v1.11.0 (Bazel 0.17.2)
  • Tensorflow v1.12.0+ (Bazel 0.19.2)
  • Tensorflow v2.0.0-alpha0 (Bazel 0.19.2)

Procedure

Advance_preparation
$ sudo apt instal -y libc-ares-dev
$ cd ~
$ git clone https://github.com/PINTO0309/Bazel_bin.git
Tensorflow_v1.11.0+Bazel_0.17.2
$ cd ~
$ Bazel_bin/0.17.2/Ubuntu1604_x86_64/install.sh
$ git clone -b v1.11.0 https://github.com/tensorflow/tensorflow.git
$ cd ~/tensorflow
$ git checkout v1.11.0

$ sudo bazel clean
$ sudo bazel run tensorflow/contrib/lite/tools:visualize -- ~/weights.tflite model_viz.html
model_viz.html
~/.cache/bazel/_bazel_root/xxxx/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/contrib/lite/tools/visualize.runfiles/org_tensorflow/model_viz.html
Tensorflow_v1.12.0+Bazel_0.19.2
$ cd ~
$ Bazel_bin/0.19.2/Ubuntu1604_x86_64/install.sh
$ git clone -b v1.12.0 https://github.com/tensorflow/tensorflow.git
$ cd ~/tensorflow
$ git checkout -b v1.12.0

$ sudo bazel clean
$ sudo bazel run tensorflow/contrib/lite/tools:visualize -- ~/weights.tflite model_viz.html
Tensorflow_v2.0.0-alpha0+Bazel_0.19.2
$ cd ~
$ Bazel_bin/0.19.2/Ubuntu1604_x86_64/install.sh
$ git clone -b v2.0.0-alpha0 https://github.com/tensorflow/tensorflow.git
$ cd ~/tensorflow
$ git checkout v2.0.0-alpha0

$ sudo bazel clean
$ sudo bazel run tensorflow/lite/tools:visualize -- ~/weights.tflite model_viz.html
model_viz.html
~/.cache/bazel/_bazel_root/xxxx/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/lite/tools/visualize.runfiles/org_tensorflow/model_viz.html

screencapture-file-home-b920405-cache-bazel-_bazel_root-1b482cb833d8dba716c683473b9bb6cb-execroot-org_tensorflow-bazel-out-k8-opt-bin-tensorflow-contrib-lite-tools-visualize-runfiles-org_tensorflow-model_viz-html-2019-03-17-14_31_15.png

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4