Optimazation is done

This commit is contained in:
2026-08-06 18:56:36 +02:00
parent 7f92e6884d
commit fb59d61ad5
19 changed files with 2179 additions and 37 deletions
@@ -63,6 +63,24 @@ struct trainable_layer:layer{
panic::tensor::real_matrix dweights;
panic::tensor::real_vector dbiases;
/**
* @brief Previous parameter updates used by momentum SGD.
*
* These remain empty unless an optimizer using momentum
* initializes them.
*/
panic::tensor::real_matrix weight_momentums;
panic::tensor::real_vector bias_momentums;
/**
* @brief Previous parameter updates used by AdaGrad.
*
* These remain empty unless an optimizer using cache
* initializes them.
*/
panic::tensor::real_matrix weight_cache;
panic::tensor::real_vector bias_cache;
virtual ~trainable_layer() = default;