Last active
April 14, 2020 17:27
-
-
Save pra-dan/19b6425f6beabc15886a7f8c4a9e1a0c to your computer and use it in GitHub Desktop.
Demo code for "Importing TensorFlow Models" section of TIDL setup, mentioned here: "http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_03_00_07/linux/Foundational_Components_TIDL.html#importing-tensorflow-models"
This file contains hidden or 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
# Obtain frozen graph of mobilenet v1 | |
!wget "http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224.tgz" | |
!tar -xf mobilenet_v1_1.0_224.tgz | |
# Get TensorFlow source code repo | |
!git clone "https://github.com/tensorflow/tensorflow.git" | |
# Optimize graph using TensorFlow tool | |
!python "/content/tensorflow/tensorflow/python/tools/optimize_for_inference.py" --input=mobilenet_v1_1.0_224_frozen.pb --output=mobilenet_v1_1.0_224_final.pb --input_names=input --output_names="MobilenetV1/Predictions/Softmax" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment