Created
July 28, 2023 12:18
-
-
Save hietalajulius/6090008dbf519586b986b5bf0407442d 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
fn sgd(&mut self, learning_rate: f64) { | |
self.W = | |
self.W.clone() - self.dL_dW.clone().expect("No gradient registered") * learning_rate; | |
self.b = | |
self.b.clone() - self.dL_db.clone().expect("No gradient registered") * learning_rate; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment