3#include "Optimizer.hpp"
13 ~SGD()
override =
default;
16 const Eigen::MatrixXd &weightsGrad)
override {
17 weights = weights.array() - (this->alpha * weightsGrad).array();
21 const Eigen::MatrixXd &biasesGrad)
override {
22 biases = biases.array() - (this->alpha * biasesGrad).array();
26 void insiderInit(
size_t size)
override{};
Definition Optimizer.hpp:6
void updateWeights(Eigen::MatrixXd &weights, const Eigen::MatrixXd &weightsGrad) override
This function updates the weights passed based on the selected Optimizer and the weights gradients.
Definition SGD.hpp:15
void updateBiases(Eigen::MatrixXd &biases, const Eigen::MatrixXd &biasesGrad) override
This function updates the biases passed based based on the Optimizer and the biases gradients.
Definition SGD.hpp:20