How to save a model (with text vectorizer & embedding) in .h5 format?

Hi, When I try to do model.save(‘filename.h5’) for a model with text vectorizer & embedding involved, I get below error msg:
Save or restore weights that is not an instance of tf.Variable is not supported in h5, use save_format='tf' instead. Received a model or layer TextVectorization with weights

However, given that in the TF cert exam we need to upload .h5 models (i.e., tf format might not help), how do we handle this situation?

1 Like