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`.