5619b6770675a7fedd85cbc5ab19773a3ba94e13,autokeras/net_module.py,NetworkModule,predict,#NetworkModule#Any#,117

Before Change


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

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

    def evaluate(self, test_data):
        Evaluate the performance of the best architecture in terms of the loss.

After Change


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

        return Backend.predict(model, test_loader)


class CnnModule(NetworkModule):
     Class to create a CNN module.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 16

Instances


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


Project Name: jhfjhfj1/autokeras
Commit Name: a0efd9b22aae8cf6340977a36ec798a00ae86804
Time: 2018-12-03
Author: jhfjhfj1@gmail.com
File Name: autokeras/supervised.py
Class Name: DeepSupervised
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