Generic Optimizer class.
This class represents the general class for all optimizers in the Deep Learning Module.
Definition at line 44 of file Optimizer.h.
Public Types | |
using | Matrix_t = typename Architecture_t::Matrix_t |
using | Scalar_t = typename Architecture_t::Scalar_t |
Public Member Functions | |
VOptimizer (Scalar_t learningRate, DeepNet_t &deepNet) | |
Constructor. More... | |
virtual | ~VOptimizer ()=default |
Virtual Destructor. More... | |
size_t | GetGlobalStep () const |
Layer_t * | GetLayerAt (size_t i) |
std::vector< Layer_t * > & | GetLayers () |
Scalar_t | GetLearningRate () const |
Getters. More... | |
void | IncrementGlobalStep () |
Increments the global step. More... | |
void | SetLearningRate (size_t learningRate) |
Setters. More... | |
void | Step () |
Performs one step of optimization. More... | |
Protected Member Functions | |
virtual void | UpdateBiases (size_t layerIndex, std::vector< Matrix_t > &biases, const std::vector< Matrix_t > &biasGradients)=0 |
Update the biases, given the current bias gradients. More... | |
virtual void | UpdateWeights (size_t layerIndex, std::vector< Matrix_t > &weights, const std::vector< Matrix_t > &weightGradients)=0 |
Update the weights, given the current weight gradients. More... | |
Protected Attributes | |
DeepNet_t & | fDeepNet |
The reference to the deep net. More... | |
size_t | fGlobalStep |
The current global step count during training. More... | |
Scalar_t | fLearningRate |
The learning rate used for training. More... | |
#include <TMVA/DNN/Optimizer.h>
using TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::Matrix_t = typename Architecture_t::Matrix_t |
Definition at line 46 of file Optimizer.h.
using TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::Scalar_t = typename Architecture_t::Scalar_t |
Definition at line 47 of file Optimizer.h.
TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::VOptimizer | ( | Scalar_t | learningRate, |
DeepNet_t & | deepNet | ||
) |
Constructor.
Definition at line 90 of file Optimizer.h.
|
virtualdefault |
Virtual Destructor.
|
inline |
Definition at line 77 of file Optimizer.h.
|
inline |
Definition at line 79 of file Optimizer.h.
|
inline |
Definition at line 78 of file Optimizer.h.
|
inline |
Getters.
Definition at line 76 of file Optimizer.h.
|
inline |
Increments the global step.
Definition at line 73 of file Optimizer.h.
|
inline |
Setters.
Definition at line 82 of file Optimizer.h.
auto TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::Step |
Performs one step of optimization.
Definition at line 97 of file Optimizer.h.
|
protectedpure virtual |
Update the biases, given the current bias gradients.
Implemented in TMVA::DNN::TAdadelta< Architecture_t, Layer_t, DeepNet_t >, TMVA::DNN::TAdagrad< Architecture_t, Layer_t, DeepNet_t >, TMVA::DNN::TAdam< Architecture_t, Layer_t, DeepNet_t >, TMVA::DNN::TRMSProp< Architecture_t, Layer_t, DeepNet_t >, and TMVA::DNN::TSGD< Architecture_t, Layer_t, DeepNet_t >.
|
protectedpure virtual |
Update the weights, given the current weight gradients.
Implemented in TMVA::DNN::TAdadelta< Architecture_t, Layer_t, DeepNet_t >, TMVA::DNN::TAdagrad< Architecture_t, Layer_t, DeepNet_t >, TMVA::DNN::TAdam< Architecture_t, Layer_t, DeepNet_t >, TMVA::DNN::TRMSProp< Architecture_t, Layer_t, DeepNet_t >, and TMVA::DNN::TSGD< Architecture_t, Layer_t, DeepNet_t >.
|
protected |
The reference to the deep net.
Definition at line 52 of file Optimizer.h.
|
protected |
The current global step count during training.
Definition at line 51 of file Optimizer.h.
|
protected |
The learning rate used for training.
Definition at line 50 of file Optimizer.h.