0

I follow this tutorial on keras https://keras.io/examples/nlp/semantic_similarity_with_bert/

I wanted to save the model with this command

model.save("saved_model/my_model")

I got this warnings when i saved the model enter image description here

Then when i want to load the model to use it with this command

 tf.keras.models.load_model('saved_model/my_model')

I got this error enter image description here

Is this the good way to save the model ?

T A
  • 1,677
  • 4
  • 21
  • 29

1 Answers1

0

your first structure is inside a dict. You must extract the item from the dict to be able to get rid of your error. Try checking this out.

hoek rand
  • 329
  • 2
  • 15
  • But where should I do that ? Because I just created a model and I want to save it. – Nicolas Thomazo Jan 04 '21 at 13:13
  • https://stackoverflow.com/questions/33759623/tensorflow-how-to-save-restore-a-model?rq=1 This gives a nice explanation on how to create and save a model – hoek rand Jan 05 '21 at 08:55