ROOT 6.18/05 Reference Guide |
Adam Optimizer class.
This class represents the Adam Optimizer.
Public Types | |
using | Matrix_t = typename Architecture_t::Matrix_t |
using | Scalar_t = typename Architecture_t::Scalar_t |
Public Types inherited from TMVA::DNN::VOptimizer< Architecture_t, VGeneralLayer< Architecture_t >, TDeepNet< Architecture_t, VGeneralLayer< Architecture_t > > > | |
using | Matrix_t = typename Architecture_t::Matrix_t |
using | Scalar_t = typename Architecture_t::Scalar_t |
Public Member Functions | |
TAdam (DeepNet_t &deepNet, Scalar_t learningRate=0.001, Scalar_t beta1=0.9, Scalar_t beta2=0.999, Scalar_t epsilon=1e-8) | |
Constructor. More... | |
~TAdam ()=default | |
Destructor. More... | |
Scalar_t | GetBeta1 () const |
Getters. More... | |
Scalar_t | GetBeta2 () const |
Scalar_t | GetEpsilon () const |
std::vector< std::vector< Matrix_t > > & | GetFirstMomentBiases () |
std::vector< Matrix_t > & | GetFirstMomentBiasesAt (size_t i) |
std::vector< std::vector< Matrix_t > > & | GetFirstMomentWeights () |
std::vector< Matrix_t > & | GetFirstMomentWeightsAt (size_t i) |
std::vector< std::vector< Matrix_t > > & | GetSecondMomentBiases () |
std::vector< Matrix_t > & | GetSecondMomentBiasesAt (size_t i) |
std::vector< std::vector< Matrix_t > > & | GetSecondMomentWeights () |
std::vector< Matrix_t > & | GetSecondMomentWeightsAt (size_t i) |
Public Member Functions inherited from TMVA::DNN::VOptimizer< Architecture_t, VGeneralLayer< Architecture_t >, TDeepNet< Architecture_t, VGeneralLayer< Architecture_t > > > | |
VOptimizer (Scalar_t learningRate, TDeepNet< Architecture_t, VGeneralLayer< Architecture_t > > &deepNet) | |
Constructor. More... | |
virtual | ~VOptimizer ()=default |
Virtual Destructor. More... | |
size_t | GetGlobalStep () const |
VGeneralLayer< Architecture_t > * | GetLayerAt (size_t i) |
std::vector< VGeneralLayer< Architecture_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 | |
void | UpdateBiases (size_t layerIndex, std::vector< Matrix_t > &biases, const std::vector< Matrix_t > &biasGradients) |
Update the biases, given the current bias gradients. More... | |
void | UpdateWeights (size_t layerIndex, std::vector< Matrix_t > &weights, const std::vector< Matrix_t > &weightGradients) |
Update the weights, given the current weight gradients. More... | |
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 | |
Scalar_t | fBeta1 |
The Beta1 constant used by the optimizer. More... | |
Scalar_t | fBeta2 |
The Beta2 constant used by the optimizer. More... | |
Scalar_t | fEpsilon |
The Smoothing term used to avoid division by zero. More... | |
std::vector< std::vector< Matrix_t > > | fFirstMomentBiases |
The decaying average of the first moment of the past bias gradients associated with the deep net. More... | |
std::vector< std::vector< Matrix_t > > | fFirstMomentWeights |
The decaying average of the first moment of the past weight gradients associated with the deep net. More... | |
std::vector< std::vector< Matrix_t > > | fSecondMomentBiases |
The decaying average of the second moment of the past bias gradients associated with the deep net. More... | |
std::vector< std::vector< Matrix_t > > | fSecondMomentWeights |
The decaying average of the second moment of the past weight gradients associated with the deep net. More... | |
Protected Attributes inherited from TMVA::DNN::VOptimizer< Architecture_t, VGeneralLayer< Architecture_t >, TDeepNet< Architecture_t, VGeneralLayer< Architecture_t > > > | |
TDeepNet< Architecture_t, VGeneralLayer< Architecture_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/Adam.h>
using TMVA::DNN::TAdam< Architecture_t, Layer_t, DeepNet_t >::Matrix_t = typename Architecture_t::Matrix_t |
using TMVA::DNN::TAdam< Architecture_t, Layer_t, DeepNet_t >::Scalar_t = typename Architecture_t::Scalar_t |
|
default |
Destructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protectedvirtual |
Update the biases, given the current bias gradients.
|
protectedvirtual |
Update the weights, given the current weight gradients.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |