Closed xuean009 closed 2 years ago
model = clf.export_model() 输出的model感觉是最后一次训练的model,不是best model please help me,thank you ,谢谢
I have same problem
It stops whenever maximum number of epochs are reached in just 1 case and it out put the last model and last epoch
I have same problem
Have you solved it ?
Fit consists of 2 steps, search and final fit. The "last trained model" is the best model during search and final fit with your entire training set. During the search it was only trained with a split of the data you provided.
So the difference in accuracy is mainly because it is using different dataset to evaluate.
If you use clf.fit(x_train, y_train, validation_data=(x_test, y_test)
and clf.evaluate(x_test, y_test)
, the accuracy should be the same.
I have same problem
Have you solved it ?
solved by manually add keras.callbacks.EarlyStopping in clf.fit
Fit consists of 2 steps, search and final fit. The "last trained model" is the best model during search and final fit with your entire training set. During the search it was only trained with a split of the data you provided.
So the difference in accuracy is mainly because it is using different dataset to evaluate.
If you use
clf.fit(x_train, y_train, validation_data=(x_test, y_test)
andclf.evaluate(x_test, y_test)
, the accuracy should be the same.
Are you sure? I think it's using best loss rather than best val_ metric.