I am trying to convert tensorflow pretrained model to tflite, model input shape is [1,320,320,3], but after converting into tflite model I am getting input shape as [1,1,1,3]. here's the conversion code I am using:
import tensorflow as tf
# Convert the model
converter = tf.lite.TFLiteConverter.from_saved_model('/content/drive/MyDrive/ssd_mobilenet_v2_320x320_coco17_tpu-8/saved_model') # path to the SavedModel directory
tflite_model = converter.convert()
# Save the model.
with open('model.tflite', 'wb') as f:
f.write(tflite_model)
I am trying this code in google colab. tensorflow version is 2.12