🦋
Gunlukler
  • Gunlukler
  • 📅21 Jan
  • 📅22 Jan
  • 📅7 Feb
    • 🔗Linking App to MLKit
  • 📅20 Feb
  • 📅1 Mar
  • 📅22 Mar
  • 📅19 Apr
  • 📅20 Apr
    • 🔒BAG sunumu
  • 🌸Bahar
  • 💬NLP
    • 🙌🏻 Handling texts
  • 📚Coursera
Powered by GitBook
On this page

Was this helpful?

20 Feb

👮‍♀️ Getting input and output shape of TFLite model

import tensorflow as tf

interpreter = tf.lite.Interpreter(model_path="C:/Users/asmaa/Documents/GitHub/MLKitDemo/app/src/main/assets/detect.tflite")
interpreter.allocate_tensors()

# Print input shape and type
print(interpreter.get_input_details()[0]['shape'])  # Example: [1 224 224 3]
print(interpreter.get_input_details()[0]['dtype'])  # Example: <class 'numpy.float32'>

# Print output shape and type
print(interpreter.get_output_details()[0]['shape'])  # Example: [1 1000]
print(interpreter.get_output_details()[0]['dtype'])  # Example: <class 'numpy.float32'>
PreviousLinking App to MLKitNext1 Mar

Last updated 5 years ago

Was this helpful?

📅