5619b6770675a7fedd85cbc5ab19773a3ba94e13,autokeras/supervised.py,SingleModelSupervised,predict,#SingleModelSupervised#Any#,336

Before Change


        model = self.graph.produce_model()
        model.eval()

        outputs = []
        with torch.no_grad():
            for index, inputs in enumerate(test_loader):
                outputs.append(model(inputs).numpy())
        output = reduce(lambda x, y: np.concatenate((x, y)), outputs)
        return self.inverse_transform_y(output)

    def evaluate(self, x_test, y_test):
        Return the accuracy score between predict value and `y_test`.

After Change


        model = self.graph.produce_model()
        model.eval()

        output = Backend.predict(model, test_loader)
        return self.inverse_transform_y(output)

    def evaluate(self, x_test, y_test):
        Return the accuracy score between predict value and `y_test`.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 15

Instances


Project Name: keras-team/autokeras
Commit Name: 5619b6770675a7fedd85cbc5ab19773a3ba94e13
Time: 2019-03-30
Author: immortalness@gmail.com
File Name: autokeras/supervised.py
Class Name: SingleModelSupervised
Method Name: predict


Project Name: jhfjhfj1/autokeras
Commit Name: 5619b6770675a7fedd85cbc5ab19773a3ba94e13
Time: 2019-03-30
Author: immortalness@gmail.com
File Name: autokeras/net_module.py
Class Name: NetworkModule
Method Name: predict


Project Name: jhfjhfj1/autokeras
Commit Name: 5619b6770675a7fedd85cbc5ab19773a3ba94e13
Time: 2019-03-30
Author: immortalness@gmail.com
File Name: autokeras/supervised.py
Class Name: SingleModelSupervised
Method Name: predict