From b91d36fa38be07397b505433f24a6d29a79c2642 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Fri, 21 Feb 2025 13:04:45 +0100 Subject: Neural returns 1 on all-zero input, not 0. --- test/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Main.hs b/test/Main.hs index 86b6011..04a8923 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -19,7 +19,7 @@ main = defaultMain $ testGroup "Tests" let problem = FNeural [(V.replicate 6 0.0, V.replicate 6 0.0), (V.replicate 24 0.0, V.replicate 4 0.0)] (V.replicate 1 0.0) - in fst (gradient' @Double fneural problem 1) @?= 0.0 + in fst (gradient' @Double fneural problem 1) @?= fneural problem ,testProperty "neural run" $ property $ do input <- forAll genNeuralInput let (res, _grad) = gradient' fneural input 1 -- cgit v1.2.3-70-g09d2