Add the SGD optimizer (#160)

* Add the nn::optim and some conversion traits.

* Add the backward_step function for SGD.

* Get the SGD optimizer to work and add a test.

* Make the test slighly simpler.
This commit is contained in:
Laurent Mazare
2023-07-13 19:05:44 +01:00
committed by GitHub
parent 5ee3c95582
commit ded93a1169
6 changed files with 168 additions and 4 deletions

View File

@ -36,6 +36,7 @@
mod backend;
mod backprop;
mod conv;
mod convert;
mod cpu_backend;
#[cfg(feature = "cuda")]
mod cuda_backend;