Skip to content

Instantly share code, notes, and snippets.

@bmabir17
Last active August 13, 2020 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmabir17/09e7ef11b86e66b7564ae3f4bf1559de to your computer and use it in GitHub Desktop.
Save bmabir17/09e7ef11b86e66b7564ae3f4bf1559de to your computer and use it in GitHub Desktop.
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