192c521848ffa30207b9b507056880e08ac173f0,python/baseline/keras/classify/train.py,ClassifyTrainerKeras,_test,#ClassifyTrainerKeras#Any#,92

Before Change


        for batch_dict in loader:
            x, y = self.model.make_input(batch_dict)
            metrics = self.model.impl.test_on_batch(x, y)
            for i in range(len(self.model.impl.metrics_names)):
                name = self.model.impl.metrics_names[i]
                name = ClassifyTrainerKeras.METRIC_REMAP.get(name, name)
                test_metrics[name] = test_metrics.get(name, 0) + metrics[i]
            pg.update()
        pg.done()

        for k, v in test_metrics.items():

After Change


            truth = batch_dict["y"]
            x, y = self.model.make_input(batch_dict)
            pred = self.model.impl.predict_on_batch(x)
            guess = np.argmax(pred, axis=-1)
            cm.add_batch(truth, guess)
            pg.update()
        pg.done()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: dpressel/mead-baseline
Commit Name: 192c521848ffa30207b9b507056880e08ac173f0
Time: 2018-08-31
Author: dpressel@gmail.com
File Name: python/baseline/keras/classify/train.py
Class Name: ClassifyTrainerKeras
Method Name: _test


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: dpressel/mead-baseline
Commit Name: 192c521848ffa30207b9b507056880e08ac173f0
Time: 2018-08-31
Author: dpressel@gmail.com
File Name: python/baseline/keras/classify/train.py
Class Name: ClassifyTrainerKeras
Method Name: _test