deriv_relu_1d

Function deriv_relu_1d 

Source
pub fn deriv_relu_1d(input_array: Array1<f64>) -> Array1<f64>
Expand description

Derivative of Relu function

§Arguments

  • input_array: 1d array

returns: Array1<f64>

§Examples

use ducky_learn::activations::*;
use ndarray::arr1;

let input_array = arr1(&[1.3456435325242, -32145324321., 132432888.]);
assert_eq!(deriv_relu_1d(input_array), arr1(&[1., 0., 1.]));