老师您好,通过上节ModelCheckpoint保存的模型,既保存了模型又保存了参数,与tf.saved_model.save(model, “./keras_saved_graph”)保存了模型又保存了参数,除了保存的两种方式保存的模型类型不同之外,有什么本质的区别呢?
logdir = './graph_def_and_weights’
if not os.path.exists(logdir):
os.mkdir(logdir)
output_model_file = os.path.join(logdir,
“fashion_mnist_model.h5”)
keras.callbacks.ModelCheckpoint(output_model_file,
save_best_only = True,
save_weights_only = False)