Skip to content

Instantly share code, notes, and snippets.

@pra-dan
Last active April 14, 2020 17:27
Show Gist options
  • Save pra-dan/19b6425f6beabc15886a7f8c4a9e1a0c to your computer and use it in GitHub Desktop.
Save pra-dan/19b6425f6beabc15886a7f8c4a9e1a0c to your computer and use it in GitHub Desktop.
# 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