Logo ROOT   6.18/05
Reference Guide
List of all members | Public Member Functions | Public Attributes | Protected Attributes | List of all members
TMVA::DNN::Settings Class Reference

Settings for the training of the neural net.

Definition at line 736 of file NeuralNet.h.

Public Member Functions

 Settings (TString name, size_t _convergenceSteps=15, size_t _batchSize=10, size_t _testRepetitions=7, double _factorWeightDecay=1e-5, TMVA::DNN::EnumRegularization _regularization=TMVA::DNN::EnumRegularization::NONE, MinimizerType _eMinimizerType=MinimizerType::fSteepest, double _learningRate=1e-5, double _momentum=0.3, int _repetitions=3, bool _multithreading=true)
 c'tor More...
 
virtual ~Settings ()
 d'tor More...
 
void addPoint (std::string histoName, double x)
 for monitoring More...
 
void addPoint (std::string histoName, double x, double y)
 for monitoring More...
 
size_t batchSize () const
 mini-batch size More...
 
void clear (std::string histoName)
 for monitoring More...
 
virtual void computeResult (const Net &, std::vector< double > &)
 callback for monitoring and loggging More...
 
size_t convergenceCount () const
 returns the current convergence count More...
 
size_t convergenceSteps () const
 how many steps until training is deemed to have converged More...
 
void create (std::string histoName, int bins, double min, double max)
 for monitoring More...
 
void create (std::string histoName, int bins, double min, double max, int bins2, double min2, double max2)
 for monitoring More...
 
virtual void cycle (double progress, TString text)
 
virtual void drawSample (const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, double)
 callback for monitoring and loggging More...
 
const std::vector< double > & dropFractions () const
 
size_t dropRepetitions () const
 
virtual void endTestCycle ()
 callback for monitoring and loggging More...
 
virtual void endTrainCycle (double)
 callback for monitoring and logging More...
 
bool exists (std::string histoName)
 for monitoring More...
 
double factorWeightDecay () const
 get the weight-decay factor More...
 
virtual bool hasConverged (double testError)
 has this training converged already? More...
 
double learningRate () const
 get the learning rate More...
 
size_t maxConvergenceCount () const
 returns the max convergence count so far More...
 
size_t minError () const
 returns the smallest error so far More...
 
MinimizerType minimizerType () const
 which minimizer shall be used (e.g. SGD) More...
 
double momentum () const
 get the momentum (e.g. for SGD) More...
 
void pads (int numPads)
 preparation for monitoring More...
 
void plot (std::string histoName, std::string options, int pad, EColor color)
 for monitoring More...
 
EnumRegularization regularization () const
 some regularization of the DNN is turned on? More...
 
int repetitions () const
 how many steps have to be gone until the batch is changed More...
 
template<typename Iterator >
void setDropOut (Iterator begin, Iterator end, size_t _dropRepetitions)
 set the drop-out configuration (layer-wise) More...
 
void setMonitoring (std::shared_ptr< Monitoring > ptrMonitoring)
 prepared for monitoring More...
 
virtual void setProgressLimits (double minProgress=0, double maxProgress=100)
 
virtual void startTestCycle ()
 callback for monitoring and loggging More...
 
virtual void startTrainCycle ()
 
virtual void startTraining ()
 
virtual void testIteration ()
 callback for monitoring and loggging More...
 
size_t testRepetitions () const
 how often is the test data tested More...
 
virtual void testSample (double, double, double, double)
 virtual function to be used for monitoring (callback) More...
 
bool useMultithreading () const
 is multithreading turned on? More...
 

Public Attributes

size_t count_dE
 
size_t count_E
 
size_t count_mb_dE
 
size_t count_mb_E
 
double fLearningRate
 
MinimizerType fMinimizerType
 
double fMomentum
 
int fRepetitions
 
size_t m_batchSize
 mini-batch size More...
 
size_t m_convergenceCount
 
size_t m_convergenceSteps
 number of steps without improvement to consider the DNN to have converged More...
 
std::vector< double > m_dropOut
 
double m_dropRepetitions
 
double m_factorWeightDecay
 
size_t m_maxConvergenceCount
 
double m_maxProgress
 current limits for the progress bar More...
 
double m_minError
 
double m_minProgress
 current limits for the progress bar More...
 
EnumRegularization m_regularization
 
size_t m_testRepetitions
 
Timer m_timer
 timer for monitoring More...
 

Protected Attributes

std::shared_ptr< MonitoringfMonitoring
 
bool m_useMultithreading
 

#include <TMVA/NeuralNet.h>

Inheritance diagram for TMVA::DNN::Settings:
[legend]

Constructor & Destructor Documentation

◆ Settings()

TMVA::DNN::Settings::Settings ( TString  name,
size_t  _convergenceSteps = 15,
size_t  _batchSize = 10,
size_t  _testRepetitions = 7,
double  _factorWeightDecay = 1e-5,
TMVA::DNN::EnumRegularization  _regularization = TMVA::DNN::EnumRegularization::NONE,
MinimizerType  _eMinimizerType = MinimizerType::fSteepest,
double  _learningRate = 1e-5,
double  _momentum = 0.3,
int  _repetitions = 3,
bool  _multithreading = true 
)

c'tor

Definition at line 232 of file NeuralNet.cxx.

◆ ~Settings()

TMVA::DNN::Settings::~Settings ( )
virtual

d'tor

Definition at line 261 of file NeuralNet.cxx.

Member Function Documentation

◆ addPoint() [1/2]

void TMVA::DNN::Settings::addPoint ( std::string  histoName,
double  x 
)
inline

for monitoring

Definition at line 828 of file NeuralNet.h.

◆ addPoint() [2/2]

void TMVA::DNN::Settings::addPoint ( std::string  histoName,
double  x,
double  y 
)
inline

for monitoring

Definition at line 829 of file NeuralNet.h.

◆ batchSize()

size_t TMVA::DNN::Settings::batchSize ( ) const
inline

mini-batch size

Definition at line 774 of file NeuralNet.h.

◆ clear()

void TMVA::DNN::Settings::clear ( std::string  histoName)
inline

for monitoring

Definition at line 831 of file NeuralNet.h.

◆ computeResult()

virtual void TMVA::DNN::Settings::computeResult ( const Net ,
std::vector< double > &   
)
inlinevirtual

callback for monitoring and loggging

Definition at line 816 of file NeuralNet.h.

◆ convergenceCount()

size_t TMVA::DNN::Settings::convergenceCount ( ) const
inline

returns the current convergence count

Definition at line 834 of file NeuralNet.h.

◆ convergenceSteps()

size_t TMVA::DNN::Settings::convergenceSteps ( ) const
inline

how many steps until training is deemed to have converged

Definition at line 773 of file NeuralNet.h.

◆ create() [1/2]

void TMVA::DNN::Settings::create ( std::string  histoName,
int  bins,
double  min,
double  max 
)
inline

for monitoring

Definition at line 826 of file NeuralNet.h.

◆ create() [2/2]

void TMVA::DNN::Settings::create ( std::string  histoName,
int  bins,
double  min,
double  max,
int  bins2,
double  min2,
double  max2 
)
inline

for monitoring

Definition at line 827 of file NeuralNet.h.

◆ cycle()

virtual void TMVA::DNN::Settings::cycle ( double  progress,
TString  text 
)
inlinevirtual
Parameters
textadvance on the progress bar

Definition at line 806 of file NeuralNet.h.

◆ drawSample()

virtual void TMVA::DNN::Settings::drawSample ( const std::vector< double > &  ,
const std::vector< double > &  ,
const std::vector< double > &  ,
double   
)
inlinevirtual

callback for monitoring and loggging

Definition at line 814 of file NeuralNet.h.

◆ dropFractions()

const std::vector< double > & TMVA::DNN::Settings::dropFractions ( ) const
inline

Definition at line 769 of file NeuralNet.h.

◆ dropRepetitions()

size_t TMVA::DNN::Settings::dropRepetitions ( ) const
inline

Definition at line 768 of file NeuralNet.h.

◆ endTestCycle()

virtual void TMVA::DNN::Settings::endTestCycle ( )
inlinevirtual

callback for monitoring and loggging

Reimplemented in TMVA::DNN::ClassificationSettings.

Definition at line 812 of file NeuralNet.h.

◆ endTrainCycle()

virtual void TMVA::DNN::Settings::endTrainCycle ( double  )
inlinevirtual

callback for monitoring and logging

Reimplemented in TMVA::DNN::ClassificationSettings.

Definition at line 795 of file NeuralNet.h.

◆ exists()

bool TMVA::DNN::Settings::exists ( std::string  histoName)
inline

for monitoring

Definition at line 832 of file NeuralNet.h.

◆ factorWeightDecay()

double TMVA::DNN::Settings::factorWeightDecay ( ) const
inline

get the weight-decay factor

Definition at line 776 of file NeuralNet.h.

◆ hasConverged()

bool TMVA::DNN::Settings::hasConverged ( double  testError)
virtual

has this training converged already?

check for convergence

Definition at line 488 of file NeuralNet.cxx.

◆ learningRate()

double TMVA::DNN::Settings::learningRate ( ) const
inline

get the learning rate

Definition at line 778 of file NeuralNet.h.

◆ maxConvergenceCount()

size_t TMVA::DNN::Settings::maxConvergenceCount ( ) const
inline

returns the max convergence count so far

Definition at line 835 of file NeuralNet.h.

◆ minError()

size_t TMVA::DNN::Settings::minError ( ) const
inline

returns the smallest error so far

Definition at line 836 of file NeuralNet.h.

◆ minimizerType()

MinimizerType TMVA::DNN::Settings::minimizerType ( ) const
inline

which minimizer shall be used (e.g. SGD)

Definition at line 781 of file NeuralNet.h.

◆ momentum()

double TMVA::DNN::Settings::momentum ( ) const
inline

get the momentum (e.g. for SGD)

Definition at line 779 of file NeuralNet.h.

◆ pads()

void TMVA::DNN::Settings::pads ( int  numPads)
inline

preparation for monitoring

Definition at line 825 of file NeuralNet.h.

◆ plot()

void TMVA::DNN::Settings::plot ( std::string  histoName,
std::string  options,
int  pad,
EColor  color 
)
inline

for monitoring

Definition at line 830 of file NeuralNet.h.

◆ regularization()

EnumRegularization TMVA::DNN::Settings::regularization ( ) const
inline

some regularization of the DNN is turned on?

Definition at line 820 of file NeuralNet.h.

◆ repetitions()

int TMVA::DNN::Settings::repetitions ( ) const
inline

how many steps have to be gone until the batch is changed

Definition at line 780 of file NeuralNet.h.

◆ setDropOut()

template<typename Iterator >
void TMVA::DNN::Settings::setDropOut ( Iterator  begin,
Iterator  end,
size_t  _dropRepetitions 
)
inline

set the drop-out configuration (layer-wise)

Parameters
beginbegin of an array or vector denoting the drop-out probabilities for each layer
endend of an array or vector denoting the drop-out probabilities for each layer
_dropRepetitionsdenotes after how many repetitions the drop-out setting (which nodes are dropped out exactly) is changed

Definition at line 766 of file NeuralNet.h.

◆ setMonitoring()

void TMVA::DNN::Settings::setMonitoring ( std::shared_ptr< Monitoring ptrMonitoring)
inline

prepared for monitoring

Definition at line 771 of file NeuralNet.h.

◆ setProgressLimits()

virtual void TMVA::DNN::Settings::setProgressLimits ( double  minProgress = 0,
double  maxProgress = 100 
)
inlinevirtual
Parameters
maxProgressfor monitoring and logging (set the current "progress" limits for the display of the progress)

Definition at line 797 of file NeuralNet.h.

◆ startTestCycle()

virtual void TMVA::DNN::Settings::startTestCycle ( )
inlinevirtual

callback for monitoring and loggging

Reimplemented in TMVA::DNN::ClassificationSettings.

Definition at line 811 of file NeuralNet.h.

◆ startTrainCycle()

virtual void TMVA::DNN::Settings::startTrainCycle ( )
inlinevirtual

Reimplemented in TMVA::DNN::ClassificationSettings.

Definition at line 789 of file NeuralNet.h.

◆ startTraining()

virtual void TMVA::DNN::Settings::startTraining ( )
inlinevirtual

Definition at line 802 of file NeuralNet.h.

◆ testIteration()

virtual void TMVA::DNN::Settings::testIteration ( )
inlinevirtual

callback for monitoring and loggging

Reimplemented in TMVA::DNN::ClassificationSettings.

Definition at line 813 of file NeuralNet.h.

◆ testRepetitions()

size_t TMVA::DNN::Settings::testRepetitions ( ) const
inline

how often is the test data tested

Definition at line 775 of file NeuralNet.h.

◆ testSample()

virtual void TMVA::DNN::Settings::testSample ( double  ,
double  ,
double  ,
double   
)
inlinevirtual

virtual function to be used for monitoring (callback)

Reimplemented in TMVA::DNN::ClassificationSettings.

Definition at line 788 of file NeuralNet.h.

◆ useMultithreading()

bool TMVA::DNN::Settings::useMultithreading ( ) const
inline

is multithreading turned on?

Definition at line 822 of file NeuralNet.h.

Member Data Documentation

◆ count_dE

size_t TMVA::DNN::Settings::count_dE

Definition at line 850 of file NeuralNet.h.

◆ count_E

size_t TMVA::DNN::Settings::count_E

Definition at line 849 of file NeuralNet.h.

◆ count_mb_dE

size_t TMVA::DNN::Settings::count_mb_dE

Definition at line 852 of file NeuralNet.h.

◆ count_mb_E

size_t TMVA::DNN::Settings::count_mb_E

Definition at line 851 of file NeuralNet.h.

◆ fLearningRate

double TMVA::DNN::Settings::fLearningRate

Definition at line 859 of file NeuralNet.h.

◆ fMinimizerType

MinimizerType TMVA::DNN::Settings::fMinimizerType

Definition at line 862 of file NeuralNet.h.

◆ fMomentum

double TMVA::DNN::Settings::fMomentum

Definition at line 860 of file NeuralNet.h.

◆ fMonitoring

std::shared_ptr<Monitoring> TMVA::DNN::Settings::fMonitoring
protected

Definition at line 872 of file NeuralNet.h.

◆ fRepetitions

int TMVA::DNN::Settings::fRepetitions

Definition at line 861 of file NeuralNet.h.

◆ m_batchSize

size_t TMVA::DNN::Settings::m_batchSize

mini-batch size

Definition at line 845 of file NeuralNet.h.

◆ m_convergenceCount

size_t TMVA::DNN::Settings::m_convergenceCount

Definition at line 864 of file NeuralNet.h.

◆ m_convergenceSteps

size_t TMVA::DNN::Settings::m_convergenceSteps

number of steps without improvement to consider the DNN to have converged

Definition at line 844 of file NeuralNet.h.

◆ m_dropOut

std::vector<double> TMVA::DNN::Settings::m_dropOut

Definition at line 857 of file NeuralNet.h.

◆ m_dropRepetitions

double TMVA::DNN::Settings::m_dropRepetitions

Definition at line 856 of file NeuralNet.h.

◆ m_factorWeightDecay

double TMVA::DNN::Settings::m_factorWeightDecay

Definition at line 847 of file NeuralNet.h.

◆ m_maxConvergenceCount

size_t TMVA::DNN::Settings::m_maxConvergenceCount

Definition at line 865 of file NeuralNet.h.

◆ m_maxProgress

double TMVA::DNN::Settings::m_maxProgress

current limits for the progress bar

Definition at line 841 of file NeuralNet.h.

◆ m_minError

double TMVA::DNN::Settings::m_minError

Definition at line 866 of file NeuralNet.h.

◆ m_minProgress

double TMVA::DNN::Settings::m_minProgress

current limits for the progress bar

Definition at line 840 of file NeuralNet.h.

◆ m_regularization

EnumRegularization TMVA::DNN::Settings::m_regularization

Definition at line 854 of file NeuralNet.h.

◆ m_testRepetitions

size_t TMVA::DNN::Settings::m_testRepetitions

Definition at line 846 of file NeuralNet.h.

◆ m_timer

Timer TMVA::DNN::Settings::m_timer

timer for monitoring

Definition at line 839 of file NeuralNet.h.

◆ m_useMultithreading

bool TMVA::DNN::Settings::m_useMultithreading
protected

Definition at line 870 of file NeuralNet.h.


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