Created
July 28, 2023 12:44
-
-
Save hietalajulius/18708fa5edaeb1c7a4fa5ddc2ae25d98 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 linear layer. | |
fn get_output(&self, x: &Array2<f64>) -> Array2<f64> { | |
// Formula: (W * x^T + b)^T | |
(self.W.dot(&x.t()) + self.b.clone()).t().to_owned() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment