Saving the model to HDF5 format requires the model to be a Functional model or a Sequential model. It does not work for subclassed models, because such models are defined via the body of a Python method, which isn't safely serializable. Consider saving to the Tensorflow SavedModel format (by setting save_format="tf") or using `save_weights`.

 

利用tf.keras.model.save()保存的模型不能是子类,必须是一个函数模型或者是一个线性堆叠的模型

tf.save_model.save()保存的模型必须提供明确的输入

 

相关文章:

  • 2021-12-15
  • 2021-10-07
  • 2021-09-09
  • 2021-06-14
  • 2021-08-03
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-16
  • 2022-12-23
  • 2021-04-09
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2021-09-18
相关资源
相似解决方案