Forgot an activation function

This commit is contained in:
lluni 2023-02-04 20:01:04 +01:00
parent a02110f2db
commit 9a88ef6071
Signed by: lluni
GPG key ID: ACEEB468BC325D35

View file

@ -29,11 +29,7 @@ pub fn identity(matrix: &Array1<f64>) -> Array1<f64> {
}
pub fn identity_prime(matrix: &Array1<f64>) -> Array1<f64> {
let mut result = matrix.clone();
for x in result.iter_mut() {
*x = 1.0;
}
result
Array1::ones(matrix.raw_dim())
}
fn sigmoid(x: f64) -> f64 {