From e564f1de30f49a513fc3ac5c610aefb515ca1c6e Mon Sep 17 00:00:00 2001 From: lluni Date: Sat, 4 Feb 2023 20:22:00 +0100 Subject: [PATCH] Fixed logistic_prime --- src/functions/activation_functions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/activation_functions.rs b/src/functions/activation_functions.rs index d233ffb..074166c 100644 --- a/src/functions/activation_functions.rs +++ b/src/functions/activation_functions.rs @@ -44,7 +44,7 @@ pub fn logistic(matrix: &Array1) -> Array1 { pub fn logistic_prime(matrix: &Array1) -> Array1 { let mut result = matrix.clone(); - result.mapv_inplace(|x| sigmoid(x * (1.0 - sigmoid(x)))); + result.mapv_inplace(|x| sigmoid(x) * (1.0 - sigmoid(x))); result }