90663a73d3c1276ccbb60a6552c2e4a1ecd0d908,autokeras/search.py,Searcher,load_best_model,#Searcher#,58
Before Change
def load_best_model(self):
return model with best accuracy
return self.load_model_by_id(max(self.history, key=lambda x: x["accuracy"])["model_id"])
def add_model(self, model, x_train, y_train, x_test, y_test):
add one model while will be trained to history list
After Change
def load_best_model(self):
return model with best accuracy
return self.load_model_by_id(self.get_best_model_id())
def get_best_model_id(self):
return max(self.history, key=lambda x: x["accuracy"])["model_id"]
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: keras-team/autokeras
Commit Name: 90663a73d3c1276ccbb60a6552c2e4a1ecd0d908
Time: 2018-04-01
Author: jin@tamu.edu
File Name: autokeras/search.py
Class Name: Searcher
Method Name: load_best_model
Project Name: jhfjhfj1/autokeras
Commit Name: 9fd84ad62217e80e521f755c151a2d1dbc9ebe2d
Time: 2018-03-09
Author: jhfjhfj1@gmail.com
File Name: autokeras/search.py
Class Name: Searcher
Method Name: load_best_model