49ca8c83ca65a1060713d0295d1d206b43933e3b,autokeras/generator.py,HillClimbingClassifierGenerator,generate,#HillClimbingClassifierGenerator#,104

Before Change


            ModelTrainer(self.model, self.x_train, self.y_train, self.x_test, self.y_test, self.verbose).train_model()
            _, optimal_accuracy = self.model.evaluate(self.x_test,self.y_test,verbose=self.verbose)
            models = self._remove_duplicate(net_transfromer(self.model))
            for index in range(0,len(models)):
                models[index].compile(loss=categorical_crossentropy,
                  optimizer=Adadelta(),
                  metrics=["accuracy"])
                ModelTrainer(models[index], self.x_train, self.y_train, self.x_test, self.y_test, self.verbose).train_model()
                _, accuracy = models[index].evaluate(self.x_test, self.y_test, self.verbose)
                if accuracy > optimal_accuracy:
                    optimal_accuracy = accuracy
                    optimal_index = index
                    self.model = models[index]
        return self.model if self.optimal_index is not None else None


After Change


            _, accuracy = model.evaluate(self.x_test, self.y_test, self.verbose)
            accuracy_list.append(accuracy)

        max_index = np.argmax(np.array(accuracy_list))[0]
        max_accuracy = accuracy_list[max_index]

        if max_accuracy > optimal_accuracy:
            return new_models[max_index]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: jhfjhfj1/autokeras
Commit Name: 49ca8c83ca65a1060713d0295d1d206b43933e3b
Time: 2017-12-18
Author: jhfjhfj1@gmail.com
File Name: autokeras/generator.py
Class Name: HillClimbingClassifierGenerator
Method Name: generate


Project Name: keras-team/autokeras
Commit Name: 49ca8c83ca65a1060713d0295d1d206b43933e3b
Time: 2017-12-18
Author: jhfjhfj1@gmail.com
File Name: autokeras/generator.py
Class Name: HillClimbingClassifierGenerator
Method Name: generate


Project Name: chainer/chainercv
Commit Name: 5264565d8dd62d945c504999937d07dedd54e1ed
Time: 2017-06-07
Author: Hakuyume@users.noreply.github.com
File Name: chainercv/links/model/ssd/multibox_coder.py
Class Name: MultiboxCoder
Method Name: encode