Logo ROOT  
Reference Guide
TMVA::DNN::LayerData Class Reference

LayerData holds the data of one layer.

LayerData holds the data of one layer, but not its layout

Definition at line 436 of file NeuralNet.h.

Public Types

typedef DropContainer::const_iterator const_dropout_iterator
 
typedef function_container_type::const_iterator const_function_iterator_type
 
typedef container_type::const_iterator const_iterator_type
 
typedef std::vector< doublecontainer_type
 
typedef std::vector< std::function< double(double)> > function_container_type
 
typedef function_container_type::iterator function_iterator_type
 
typedef container_type::iterator iterator_type
 

Public Member Functions

 LayerData (const LayerData &other)
 copy c'tor of LayerData More...
 
 LayerData (const_iterator_type itInputBegin, const_iterator_type itInputEnd, ModeOutputValues eModeOutput=ModeOutputValues::DIRECT)
 c'tor of LayerData More...
 
 LayerData (LayerData &&other)
 move c'tor of LayerData More...
 
 LayerData (size_t inputSize)
 c'tor of LayerData More...
 
 LayerData (size_t size, const_iterator_type itWeightBegin, iterator_type itGradientBegin, std::shared_ptr< std::function< double(double)>> activationFunction, std::shared_ptr< std::function< double(double)>> inverseActivationFunction, ModeOutputValues eModeOutput=ModeOutputValues::DIRECT)
 c'tor of LayerData More...
 
 LayerData (size_t size, const_iterator_type itWeightBegin, std::shared_ptr< std::function< double(double)>> activationFunction, ModeOutputValues eModeOutput=ModeOutputValues::DIRECT)
 c'tor of LayerData More...
 
 ~LayerData ()
 
std::shared_ptr< std::function< double(double)> > activationFunction () const
 
void clear ()
 clear the values and the deltas More...
 
void clearDropOut ()
 clear the drop-out-data for this layer More...
 
std::shared_ptr< std::function< double(double)> > inverseActivationFunction () const
 
template<typename Iterator >
void setDropOut (Iterator itDrop)
 set the drop-out info for this layer More...
 
void setInput (const_iterator_type itInputBegin, const_iterator_type itInputEnd)
 change the input iterators More...
 

Private Member Functions

container_type computeProbabilities () const
 compute the probabilities from the node values More...
 

Private Attributes

std::shared_ptr< std::function< double(double)> > m_activationFunction
 activation function for this layer More...
 
std::vector< doublem_deltas
 stores the deltas for the DNN training More...
 
ModeOutputValues m_eModeOutput
 stores the output mode (DIRECT, SIGMOID, SOFTMAX) More...
 
bool m_hasDropOut
 dropOut is turned on? More...
 
bool m_hasGradients
 does this layer have gradients (only if in training mode) More...
 
bool m_hasWeights
 does this layer have weights (it does not if it is the input layer) More...
 
std::shared_ptr< std::function< double(double)> > m_inverseActivationFunction
 inverse activation function for this layer More...
 
bool m_isInputLayer
 is this layer an input layer More...
 
const_iterator_type m_itConstWeightBegin
 const iterator to the first weight of this layer in the weight vector More...
 
const_dropout_iterator m_itDropOut
 iterator to a container indicating if the corresponding node is to be dropped More...
 
iterator_type m_itGradientBegin
 iterator to the first gradient of this layer in the gradient vector More...
 
const_iterator_type m_itInputBegin
 iterator to the first of the nodes in the input node vector More...
 
const_iterator_type m_itInputEnd
 iterator to the end of the nodes in the input node vector More...
 
size_t m_size
 
std::vector< doublem_valueGradients
 stores the gradients of the values (nodes) More...
 
std::vector< doublem_values
 stores the values of the nodes in this layer More...
 

#include <TMVA/NeuralNet.h>

Member Typedef Documentation

◆ const_dropout_iterator

typedef DropContainer::const_iterator TMVA::DNN::LayerData::const_dropout_iterator

Definition at line 448 of file NeuralNet.h.

◆ const_function_iterator_type

typedef function_container_type::const_iterator TMVA::DNN::LayerData::const_function_iterator_type

Definition at line 446 of file NeuralNet.h.

◆ const_iterator_type

typedef container_type::const_iterator TMVA::DNN::LayerData::const_iterator_type

Definition at line 442 of file NeuralNet.h.

◆ container_type

Definition at line 439 of file NeuralNet.h.

◆ function_container_type

typedef std::vector<std::function<double(double)> > TMVA::DNN::LayerData::function_container_type

Definition at line 444 of file NeuralNet.h.

◆ function_iterator_type

typedef function_container_type::iterator TMVA::DNN::LayerData::function_iterator_type

Definition at line 445 of file NeuralNet.h.

◆ iterator_type

typedef container_type::iterator TMVA::DNN::LayerData::iterator_type

Definition at line 441 of file NeuralNet.h.

Constructor & Destructor Documentation

◆ LayerData() [1/6]

TMVA::DNN::LayerData::LayerData ( const_iterator_type  itInputBegin,
const_iterator_type  itInputEnd,
ModeOutputValues  eModeOutput = ModeOutputValues::DIRECT 
)

c'tor of LayerData

C'tor of LayerData for the input layer

Parameters
itInputBeginiterator to the begin of a vector which holds the values of the nodes of the neural net
itInputEnditerator to the end of a vector which holdsd the values of the nodes of the neural net
eModeOutputindicates a potential tranformation of the output values before further computation DIRECT does not further transformation; SIGMOID applies a sigmoid transformation to each output value (to create a probability); SOFTMAX applies a softmax transformation to all output values (mutually exclusive probability)

Definition at line 81 of file NeuralNet.cxx.

◆ LayerData() [2/6]

TMVA::DNN::LayerData::LayerData ( size_t  inputSize)

c'tor of LayerData

C'tor of LayerData for the input layer

Parameters
inputSizeinput size of this layer

Definition at line 68 of file NeuralNet.cxx.

◆ ~LayerData()

TMVA::DNN::LayerData::~LayerData ( )
inline

Definition at line 471 of file NeuralNet.h.

◆ LayerData() [3/6]

TMVA::DNN::LayerData::LayerData ( size_t  size,
const_iterator_type  itWeightBegin,
iterator_type  itGradientBegin,
std::shared_ptr< std::function< double(double)>>  activationFunction,
std::shared_ptr< std::function< double(double)>>  inverseActivationFunction,
ModeOutputValues  eModeOutput = ModeOutputValues::DIRECT 
)

c'tor of LayerData

C'tor of LayerData for all layers which are not the input layer; Used during the training of the DNN

Parameters
sizesize of the layer
itWeightBeginindicates the start of the weights for this layer on the weight vector
itGradientBeginindicates the start of the gradients for this layer on the gradient vector
itFunctionBeginindicates the start of the vector of activation functions for this layer on the activation function vector
itInverseFunctionBeginindicates the start of the vector of activation functions for this layer on the activation function vector
eModeOutputindicates a potential tranformation of the output values before further computation DIRECT does not further transformation; SIGMOID applies a sigmoid transformation to each output value (to create a probability); SOFTMAX applies a softmax transformation to all output values (mutually exclusive probability)

Definition at line 97 of file NeuralNet.cxx.

◆ LayerData() [4/6]

TMVA::DNN::LayerData::LayerData ( size_t  size,
const_iterator_type  itWeightBegin,
std::shared_ptr< std::function< double(double)>>  activationFunction,
ModeOutputValues  eModeOutput = ModeOutputValues::DIRECT 
)

c'tor of LayerData

C'tor of LayerData for all layers which are not the input layer; Used during the application of the DNN

Parameters
sizesize of the layer
itWeightBeginindicates the start of the weights for this layer on the weight vector
itFunctionBeginindicates the start of the vector of activation functions for this layer on the activation function vector
eModeOutputindicates a potential tranformation of the output values before further computation DIRECT does not further transformation; SIGMOID applies a sigmoid transformation to each output value (to create a probability); SOFTMAX applies a softmax transformation to all output values (mutually exclusive probability)

Definition at line 122 of file NeuralNet.cxx.

◆ LayerData() [5/6]

TMVA::DNN::LayerData::LayerData ( const LayerData other)
inline

copy c'tor of LayerData

Definition at line 518 of file NeuralNet.h.

◆ LayerData() [6/6]

TMVA::DNN::LayerData::LayerData ( LayerData &&  other)
inline

move c'tor of LayerData

Definition at line 541 of file NeuralNet.h.

Member Function Documentation

◆ activationFunction()

std::shared_ptr<std::function<double(double)> > TMVA::DNN::LayerData::activationFunction ( ) const
inline

Definition at line 610 of file NeuralNet.h.

◆ clear()

void TMVA::DNN::LayerData::clear ( )
inline

clear the values and the deltas

Definition at line 579 of file NeuralNet.h.

◆ clearDropOut()

void TMVA::DNN::LayerData::clearDropOut ( )
inline

clear the drop-out-data for this layer

Definition at line 623 of file NeuralNet.h.

◆ computeProbabilities()

LayerData::container_type TMVA::DNN::LayerData::computeProbabilities ( ) const
private

compute the probabilities from the node values

Definition at line 140 of file NeuralNet.cxx.

◆ inverseActivationFunction()

std::shared_ptr<std::function<double(double)> > TMVA::DNN::LayerData::inverseActivationFunction ( ) const
inline

Definition at line 611 of file NeuralNet.h.

◆ setDropOut()

template<typename Iterator >
void TMVA::DNN::LayerData::setDropOut ( Iterator  itDrop)
inline

set the drop-out info for this layer

Definition at line 617 of file NeuralNet.h.

◆ setInput()

void TMVA::DNN::LayerData::setInput ( const_iterator_type  itInputBegin,
const_iterator_type  itInputEnd 
)
inline

change the input iterators

Parameters
itInputBeginindicates the start of the input node vector
itInputEndindicates the end of the input node vector

Definition at line 568 of file NeuralNet.h.

Member Data Documentation

◆ m_activationFunction

std::shared_ptr<std::function<double(double)> > TMVA::DNN::LayerData::m_activationFunction
private

activation function for this layer

Definition at line 654 of file NeuralNet.h.

◆ m_deltas

std::vector<double> TMVA::DNN::LayerData::m_deltas
private

stores the deltas for the DNN training

Definition at line 645 of file NeuralNet.h.

◆ m_eModeOutput

ModeOutputValues TMVA::DNN::LayerData::m_eModeOutput
private

stores the output mode (DIRECT, SIGMOID, SOFTMAX)

Definition at line 661 of file NeuralNet.h.

◆ m_hasDropOut

bool TMVA::DNN::LayerData::m_hasDropOut
private

dropOut is turned on?

Definition at line 649 of file NeuralNet.h.

◆ m_hasGradients

bool TMVA::DNN::LayerData::m_hasGradients
private

does this layer have gradients (only if in training mode)

Definition at line 659 of file NeuralNet.h.

◆ m_hasWeights

bool TMVA::DNN::LayerData::m_hasWeights
private

does this layer have weights (it does not if it is the input layer)

Definition at line 658 of file NeuralNet.h.

◆ m_inverseActivationFunction

std::shared_ptr<std::function<double(double)> > TMVA::DNN::LayerData::m_inverseActivationFunction
private

inverse activation function for this layer

Definition at line 655 of file NeuralNet.h.

◆ m_isInputLayer

bool TMVA::DNN::LayerData::m_isInputLayer
private

is this layer an input layer

Definition at line 657 of file NeuralNet.h.

◆ m_itConstWeightBegin

const_iterator_type TMVA::DNN::LayerData::m_itConstWeightBegin
private

const iterator to the first weight of this layer in the weight vector

Definition at line 651 of file NeuralNet.h.

◆ m_itDropOut

const_dropout_iterator TMVA::DNN::LayerData::m_itDropOut
private

iterator to a container indicating if the corresponding node is to be dropped

Definition at line 648 of file NeuralNet.h.

◆ m_itGradientBegin

iterator_type TMVA::DNN::LayerData::m_itGradientBegin
private

iterator to the first gradient of this layer in the gradient vector

Definition at line 652 of file NeuralNet.h.

◆ m_itInputBegin

const_iterator_type TMVA::DNN::LayerData::m_itInputBegin
private

iterator to the first of the nodes in the input node vector

Definition at line 642 of file NeuralNet.h.

◆ m_itInputEnd

const_iterator_type TMVA::DNN::LayerData::m_itInputEnd
private

iterator to the end of the nodes in the input node vector

Definition at line 643 of file NeuralNet.h.

◆ m_size

size_t TMVA::DNN::LayerData::m_size
private

Definition at line 640 of file NeuralNet.h.

◆ m_valueGradients

std::vector<double> TMVA::DNN::LayerData::m_valueGradients
private

stores the gradients of the values (nodes)

Definition at line 646 of file NeuralNet.h.

◆ m_values

std::vector<double> TMVA::DNN::LayerData::m_values
private

stores the values of the nodes in this layer

Definition at line 647 of file NeuralNet.h.

Libraries for TMVA::DNN::LayerData:
[legend]

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