Problem to convert a pre-trained keras h5 model into a model, just conversion is okay, no further trainning is needed,

I had my pre-trained model implemented in Keras which is okay for our application. And since I am trying to optimize its computational performance, I have to convert it into a tf savedmodel model. I have converted the same architecture of it into tf.keras and loaded all variables from the pre-trained h5 file. but when I applied on this loaded model, it didn’t save the model’s weights into the output asset file (just empty random weights). The pb file I got is only ~2 Mb.
It would be very appreciated if someone knows how to write loaded weights into asset output.

Just to be clear, do you have the Keras model loaded in memory?

if so, you can just use something like (more details here: 保存和加载 Keras 模型  |  TensorFlow Core)
it will save in the saved_model format