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 }