From 342afccaf3ff2c4198b3a8a6b9036dd23edd1ee3 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sat, 26 Nov 2022 16:35:06 +0000 Subject: [PATCH] Added logistic regression check output Signed-off-by: Alejandro Saucedo --- examples/logistic_regression/src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/logistic_regression/src/main.cpp b/examples/logistic_regression/src/main.cpp index bc249a36f..e2a35ee21 100644 --- a/examples/logistic_regression/src/main.cpp +++ b/examples/logistic_regression/src/main.cpp @@ -63,4 +63,10 @@ main() std::cout << "w1: " << wIn->data()[0] << std::endl; std::cout << "w2: " << wIn->data()[1] << std::endl; std::cout << "b: " << bIn->data()[0] << std::endl; -} \ No newline at end of file + + if (wIn->data()[0] > 0.0 || + wIn->data()[1] < 1.0 || + bIn->data()[0] > 0.0) { + throw std::runtime_error("Result does not match"); + } +}