Created
July 28, 2023 12:37
-
-
Save hietalajulius/f45d63387df3df87bf3bb5d3e1c75f69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Get the output of the ReLU activation function. | |
fn get_output(&self, x: &Array2<f64>) -> Array2<f64> { | |
// Apply ReLU function element-wise to input x | |
x.mapv(|val| f64::max(val, 0.0)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment