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()保存的模型必須提供明確的輸入