我是科拉斯的新来的。我想要有最好重量的保存模型,如:
model1.compile(loss="mean_squared_error", optimizer="RMSprop")
model1.summary()
mcp_save = ModelCheckpoint('best_model.h5', save_best_only=True, monitor='val_accuracy', mode='auto', verbose=2)
callbacks_list = [mcp_save]
epochs = 5000
batch_size = 50
# fit the model
history = model1.fit(x_train, y_train,
batch_size=batch_size,
epochs=epochs,
callbacks=callbacks_list,
validation_data=(x_test, y_test),
verbose=2)在PyCharm2019社区版上,我没有遇到警告或错误消息。但是,我无法在项目文件文件夹中看到'best_model.h5',或者在培训过程完成后,我的计算机上还有其他什么地方??请给我一些建议好吗?我有什么缺点??
发布于 2020-03-07 18:09:21
你的密码在我看来没问题。我经常使用这个回调。我建议您使用完整的路径来指定保存模型的位置,而不是相对路径。
https://stackoverflow.com/questions/59694903
复制相似问题