Generic Optimizer class.
This class represents the general class for all optimizers in the Deep Learning Module.
Definition at line 45 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. | |
virtual | ~VOptimizer ()=default |
Virtual Destructor. | |
size_t | GetGlobalStep () const |
Layer_t * | GetLayerAt (size_t i) |
std::vector< Layer_t * > & | GetLayers () |
Scalar_t | GetLearningRate () const |
Getters. | |
void | IncrementGlobalStep () |
Increments the global step. | |
void | SetLearningRate (size_t learningRate) |
Setters. | |
void | Step () |
Performs one step of optimization. | |
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. | |
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. | |
Protected Attributes | |
DeepNet_t & | fDeepNet |
The reference to the deep net. | |
size_t | fGlobalStep |
The current global step count during training. | |
Scalar_t | fLearningRate |
The learning rate used for training. | |
#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 47 of file Optimizer.h.
using TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::Scalar_t = typename Architecture_t::Scalar_t |
Definition at line 48 of file Optimizer.h.
TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::VOptimizer | ( | Scalar_t | learningRate, |
DeepNet_t & | deepNet | ||
) |
Constructor.
Definition at line 94 of file Optimizer.h.
|
virtualdefault |
Virtual Destructor.
|
inline |
Definition at line 81 of file Optimizer.h.
|
inline |
Definition at line 83 of file Optimizer.h.
|
inline |
Definition at line 82 of file Optimizer.h.
|
inline |
Getters.
Definition at line 77 of file Optimizer.h.
|
inline |
Increments the global step.
Definition at line 74 of file Optimizer.h.
|
inline |
Setters.
Definition at line 86 of file Optimizer.h.
auto TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::Step |
Performs one step of optimization.
Definition at line 101 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 53 of file Optimizer.h.
|
protected |
The current global step count during training.
Definition at line 52 of file Optimizer.h.
|
protected |
The learning rate used for training.
Definition at line 51 of file Optimizer.h.