Skip to content

Commit

Permalink
Added logistic regression check output
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Saucedo <[email protected]>
  • Loading branch information
axsaucedo committed Nov 26, 2022
1 parent cf1dec9 commit 342afcc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/logistic_regression/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

if (wIn->data()[0] > 0.0 ||
wIn->data()[1] < 1.0 ||
bIn->data()[0] > 0.0) {
throw std::runtime_error("Result does not match");
}
}

0 comments on commit 342afcc

Please sign in to comment.