filepath = "saved-model-{epoch:02d}-{val_acc:.2f}.h5"#模型写入名字带dict的epoch,val_acc,还可以是val_loss checkpoint = ModelCheckpoint(filepath, monitor='val_acc', verbose=1, save_best_only=False, mode='max') 参考1 参考2