NeuralNet 1.0
Loading...
Searching...
No Matches
NeuralNet::SGD Class Reference

#include <SGD.hpp>

Inheritance diagram for NeuralNet::SGD:
NeuralNet::Optimizer

Public Member Functions

 SGD (double alpha)
 
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.
 
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.
 
- Public Member Functions inherited from NeuralNet::Optimizer
 Optimizer (double alpha)
 

Additional Inherited Members

- Protected Attributes inherited from NeuralNet::Optimizer
double alpha
 

Detailed Description

Stochastic Gradient Descent optimizer

Member Function Documentation

◆ updateBiases()

void NeuralNet::SGD::updateBiases ( Eigen::MatrixXd & biases,
const Eigen::MatrixXd & biasesGrad )
inlineoverridevirtual

This function updates the biases passed based based on the Optimizer and the biases gradients.

Parameters
biasesThe biases that should be updated
biasesGradThe biases gradient

The function will return void, since it only performs an update on the biases passed

Implements NeuralNet::Optimizer.

◆ updateWeights()

void NeuralNet::SGD::updateWeights ( Eigen::MatrixXd & weights,
const Eigen::MatrixXd & weightsGrad )
inlineoverridevirtual

This function updates the weights passed based on the selected Optimizer and the weights gradients.

Parameters
weightsThe weights that should be updated
weightsGradThe weights gradient

The function will return void, since it only performs an update on the weights passed

Implements NeuralNet::Optimizer.


The documentation for this class was generated from the following file: