Forgot an activation function
This commit is contained in:
parent
a02110f2db
commit
9a88ef6071
1 changed files with 1 additions and 5 deletions
|
@ -29,11 +29,7 @@ pub fn identity(matrix: &Array1<f64>) -> Array1<f64> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn identity_prime(matrix: &Array1<f64>) -> Array1<f64> {
|
pub fn identity_prime(matrix: &Array1<f64>) -> Array1<f64> {
|
||||||
let mut result = matrix.clone();
|
Array1::ones(matrix.raw_dim())
|
||||||
for x in result.iter_mut() {
|
|
||||||
*x = 1.0;
|
|
||||||
}
|
|
||||||
result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sigmoid(x: f64) -> f64 {
|
fn sigmoid(x: f64) -> f64 {
|
||||||
|
|
Loading…
Reference in a new issue