Last active
August 13, 2020 16:47
-
-
Save bmabir17/09e7ef11b86e66b7564ae3f4bf1559de to your computer and use it in GitHub Desktop.
For this article https://medium.com/chowagiken-tech-blog/deeplab-image-segmentation-on-android-with-tf-lite-part-2-tf-lite-model-conversion-android-f1fde5e25899
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
MODEL_FILE = "frozen_inference_graph_257.pb" | |
# Load the TensorFlow model | |
converter = tf.compat.v1.lite.TFLiteConverter.from_frozen_graph( | |
graph_def_file = MODEL_FILE, | |
input_arrays = ['sub_2'], # For the Xception model it needs to be `sub_7`, for MobileNet it would be `sub_2` | |
output_arrays = ['ResizeBilinear_2'], | |
input_shapes={'sub_2':[1,257,257,3]} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment