I have trained my model using SSD MobileNet V2 FPNLite 640x640 and tensorflow 2.1.0. To create .pb file used file export_tflite_graph_tf2.py. Now , want to convert .pb file to .tflite. I used following code code recommended by tensorflow community .But it is converting the model to 1kb tflite file.
I tried also using tf-nightly but same converts into 1kb
import tensorflow as tf
# Convert the model
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir) # path to the SavedModel directory
tflite_model = converter.convert()
# Save the model.
with open('model.tflite', 'wb') as f:
f.write(tflite_model)