Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 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>

Inheritance diagram for TMVA::DNN::VOptimizer< Architecture_t, Layer_t, DeepNet_t >:
[legend]

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 47 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 48 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 94 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 81 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 83 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 82 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 77 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 74 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 86 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 101 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 53 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 52 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 51 of file Optimizer.h.

  • tmva/tmva/inc/TMVA/DNN/Optimizer.h