Logo ROOT  
Reference Guide
TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t > Class Template Referenceabstract

template<typename Architecture_t, typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
class TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >

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>

Member Typedef Documentation

◆ Matrix_t

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
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.

◆ Scalar_t

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
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.

Constructor & Destructor Documentation

◆ VOptimizer()

template<typename Architecture_t , typename Layer_t , typename DeepNet_t >
TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::VOptimizer ( Scalar_t  learningRate,
DeepNet_t &  deepNet 
)

Constructor.

Definition at line 93 of file Optimizer.h.

◆ ~VOptimizer()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
virtual TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::~VOptimizer ( )
virtualdefault

Virtual Destructor.

Member Function Documentation

◆ GetGlobalStep()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
size_t TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::GetGlobalStep ( ) const
inline

Definition at line 80 of file Optimizer.h.

◆ GetLayerAt()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
Layer_t * TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::GetLayerAt ( size_t  i)
inline

Definition at line 82 of file Optimizer.h.

◆ GetLayers()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
std::vector< Layer_t * > & TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::GetLayers ( )
inline

Definition at line 81 of file Optimizer.h.

◆ GetLearningRate()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
Scalar_t TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::GetLearningRate ( ) const
inline

Getters.

Definition at line 76 of file Optimizer.h.

◆ IncrementGlobalStep()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
void TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::IncrementGlobalStep ( )
inline

Increments the global step.

Definition at line 73 of file Optimizer.h.

◆ SetLearningRate()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
void TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::SetLearningRate ( size_t  learningRate)
inline

Setters.

Definition at line 85 of file Optimizer.h.

◆ Step()

template<typename Architecture_t , typename Layer_t , typename DeepNet_t >
auto TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::Step

Performs one step of optimization.

Definition at line 100 of file Optimizer.h.

◆ UpdateBiases()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
virtual void TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::UpdateBiases ( size_t  layerIndex,
std::vector< Matrix_t > &  biases,
const std::vector< Matrix_t > &  biasGradients 
)
protectedpure virtual

◆ UpdateWeights()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
virtual void TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::UpdateWeights ( size_t  layerIndex,
std::vector< Matrix_t > &  weights,
const std::vector< Matrix_t > &  weightGradients 
)
protectedpure virtual

Member Data Documentation

◆ fDeepNet

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
DeepNet_t& TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::fDeepNet
protected

The reference to the deep net.

Definition at line 52 of file Optimizer.h.

◆ fGlobalStep

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
size_t TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::fGlobalStep
protected

The current global step count during training.

Definition at line 51 of file Optimizer.h.

◆ fLearningRate

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>, typename DeepNet_t = TDeepNet<Architecture_t, Layer_t>>
Scalar_t TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >::fLearningRate
protected

The learning rate used for training.

Definition at line 50 of file Optimizer.h.


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