我在keras https://keras.io/examples/nlp/semantic_similarity_with_bert/上学习了这篇教程。
我想用这个命令保存模型
model.save("saved_model/my_model")当我保存模型enter image description here时,我收到了这个警告
然后,当我想通过以下命令加载模型以使用它时
tf.keras.models.load_model('saved_model/my_model')我得到了这个错误enter image description here
这是保存模型的好方法吗?
发布于 2021-01-04 20:37:18
你的第一个结构是在字典里面。您必须从字典中提取条目才能消除错误。尝试查看this。
https://stackoverflow.com/questions/65561379
复制相似问题