Fixed logistic_prime
This commit is contained in:
parent
9a88ef6071
commit
e564f1de30
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ pub fn logistic(matrix: &Array1<f64>) -> Array1<f64> {
|
|||
|
||||
pub fn logistic_prime(matrix: &Array1<f64>) -> Array1<f64> {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue