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
@@ -52,13 +52,24 @@ struct optimizer_sgd: optimizer{
panic::types::real_t learning_rate;
panic::types::real_t decay;
panic::types::real_t momentum;
panic::types::uint_t iterations;
/**
* @brief Constructor
*
* @param learning_rate The learning rate for the optimization.
* @param decay The decay for the learning rate over the interations.
*
*/
optimizer_sgd(const panic::types::real_t learning_rate = static_cast<panic::types::real_t>(1e-3));
optimizer_sgd(const panic::types::real_t learning_rate = static_cast<panic::types::real_t>(1),
const panic::types::real_t decay = static_cast<panic::types::real_t>(0),
const panic::types::real_t momentum = static_cast<panic::types::real_t>(0));
/**
@@ -76,10 +87,24 @@ struct optimizer_sgd: optimizer{
*/
bool update_params(trainable_layer& layer) override;
/**
* @brief function to update internal parameters before update_params()
*
* @param layer Trianable layer to update.
*
*/
bool pre_update_params() override;
/**
* @brief function to update internal parameters after update_params()
*
*/
bool post_update_params() override;
};
} // namespace tensor
} // namespace panic