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
@@ -56,6 +56,8 @@ namespace panic{
*/
struct optimizer{
panic::types::real_t current_learning_rate;
/**
* @brief Default de-constructor
*
@@ -64,15 +66,33 @@ struct optimizer{
/**
* @brief Virtual forward function for derivative layers
* @brief Virtual update parameters function for derivative optimizers
*
* @param inputs Data matrix input for forward function.
* @param layer trainable layer to have their parameters updated
*
* @Note It's equal to 0 because it make the derivative
* object NEEDS to have these function to work.
*/
virtual bool update_params(trainable_layer& layer) = 0;
/**
* @brief Virtual function to update internal parameters before update_params()
*
*
*/
virtual bool pre_update_params(){
return true;
}
/**
* @brief Virtual function to update internal parameters after update_params()
*
*
*/
virtual bool post_update_params(){
return true;
}
};