I'm working on Tensorlfow 2.0 to train a model. I want to reduce trained model size by converting to Tensorflow Lite model. But when I load TF Lite model, it will throw the error below at code line tf.saved_model.load():
TypeError: '_UserObject' object is not callable
I have done some searching and see that I need to use tf.keras.models.load_model() instead of tf.saved_model.load() to run the TF Lite model. But the searching answer is not clearly and I can not refer to my situation.
Question: Is there any way to run TF Lite model with tf.saved_model.load()? Or I need to convert all TF code to TF Keras code?