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: 5

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: deepchem/deepchem
Commit Name: 8a015062717a7eee6d6325e06ed9fc4d369fedc6
Time: 2020-10-20
Author: bharath@Bharaths-MBP.zyxel.com
File Name: deepchem/models/tests/test_reload.py
Class Name:
Method Name: test_smiles2vec_reload


Project Name: lene/nn-wtf
Commit Name: 4065c4b2cc1ebe2eeb829e8ff3f620a4f510b096
Time: 2016-02-26
Author: lene.preuss@gmail.com
File Name: nn_wtf/neural_network_graph.py
Class Name: NeuralNetworkGraph
Method Name: predict


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