Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Last active May 27, 2019 21:25
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 frogermcs/8c835adccf7e3e103cd18093688d685f to your computer and use it in GitHub Desktop.
Save frogermcs/8c835adccf7e3e103cd18093688d685f to your computer and use it in GitHub Desktop.
tflite_interpreter = tf.lite.Interpreter(model_path=TFLITE_MODEL)
input_details = tflite_interpreter.get_input_details()
output_details = tflite_interpreter.get_output_details()
print("== Input details ==")
print("shape:", input_details[0]['shape'])
print("type:", input_details[0]['dtype'])
print("\n== Output details ==")
print("shape:", output_details[0]['shape'])
print("type:", output_details[0]['dtype'])
# >> == Input details ==
# >> shape: [ 1 224 224 3]
# >> type: <class 'numpy.float32'>
# >> == Output details ==
# >> shape: [1 5]
# >> type: <class 'numpy.float32'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment