NeuralNet 1.0
Loading...
Searching...
No Matches
NeuralNet::Optimizer Class Referenceabstract
Inheritance diagram for NeuralNet::Optimizer:
NeuralNet::Adam NeuralNet::SGD

Public Member Functions

 Optimizer (double alpha)
 
virtual void updateWeights (Eigen::MatrixXd &weights, const Eigen::MatrixXd &weightsGrad)=0
 This function updates the weights passed based on the selected Optimizer and the weights gradients.
 
virtual void updateBiases (Eigen::MatrixXd &biases, const Eigen::MatrixXd &biasesGrad)=0
 This function updates the biases passed based based on the Optimizer and the biases gradients.
 

Protected Member Functions

virtual void insiderInit (size_t size)=0
 This function's purpose is to provide an interface to perform updates for the Optimizers from within the network.
 

Protected Attributes

double alpha
 

Friends

class Network
 

Member Function Documentation

◆ insiderInit()

virtual void NeuralNet::Optimizer::insiderInit ( size_t size)
protectedpure virtual

This function's purpose is to provide an interface to perform updates for the Optimizers from within the network.

Parameters
sizeThe size (for now it's only used to init the layer's in the Adam optimizer)

This function returns nothing

◆ updateBiases()

virtual void NeuralNet::Optimizer::updateBiases ( Eigen::MatrixXd & biases,
const Eigen::MatrixXd & biasesGrad )
pure virtual

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

Implemented in NeuralNet::Adam, and NeuralNet::SGD.

◆ updateWeights()

virtual void NeuralNet::Optimizer::updateWeights ( Eigen::MatrixXd & weights,
const Eigen::MatrixXd & weightsGrad )
pure virtual

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

Implemented in NeuralNet::Adam, and NeuralNet::SGD.


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