Exemplo n.º 1
0
    def predict(self, x_test):
        """Return the predicted labels for the testing data.

        Args:
            x_test: An instance of numpy.ndarray containing the testing data.

        Returns:
            A numpy.ndarray containing the predicted labels for the testing data.
        """
        if Constant.LIMIT_MEMORY:
            pass

        x_test = self.preprocess(x_test)
        test_loader = self.data_transformer.transform_test(x_test)
        model = self.graph.produce_model()
        model.eval()

        output = Backend.predict(model, test_loader)
        return self.inverse_transform_y(output)
Exemplo n.º 2
0
    def predict(self, test_loader):
        model = self.best_model.produce_model()
        model.eval()

        return Backend.predict(model, test_loader)