Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::DNN::TDeepNet< Architecture_t, Layer_t > Class Template Reference

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

Generic Deep Neural Network class.

This classs encapsulates the information for all types of Deep Neural Networks.

Template Parameters
ArchitectureThe Architecture type that holds the architecture-specific data types.

Definition at line 73 of file DeepNet.h.

Public Types

using Matrix_t = typename Architecture_t::Matrix_t
 
using Scalar_t = typename Architecture_t::Scalar_t
 
using Tensor_t = typename Architecture_t::Tensor_t
 

Public Member Functions

 TDeepNet ()
 Default Constructor.
 
 TDeepNet (const TDeepNet &)
 Copy-constructor.
 
 TDeepNet (size_t BatchSize, size_t InputDepth, size_t InputHeight, size_t InputWidth, size_t BatchDepth, size_t BatchHeight, size_t BatchWidth, ELossFunction fJ, EInitialization fI=EInitialization::kZero, ERegularization fR=ERegularization::kNone, Scalar_t fWeightDecay=0.0, bool isTraining=false)
 Constructor.
 
 ~TDeepNet ()
 Destructor.
 
TBasicGRULayer< Architecture_t > * AddBasicGRULayer (size_t stateSize, size_t inputSize, size_t timeSteps, bool rememberState=false, bool returnSequence=false, bool resetGateAfter=false)
 Function for adding GRU Layer in the Deep Neural Network, with given parameters.
 
void AddBasicGRULayer (TBasicGRULayer< Architecture_t > *basicGRULayer)
 Function for adding GRU Layer in the Deep Neural Network, when the layer is already created.
 
TBasicLSTMLayer< Architecture_t > * AddBasicLSTMLayer (size_t stateSize, size_t inputSize, size_t timeSteps, bool rememberState=false, bool returnSequence=false)
 Function for adding LSTM Layer in the Deep Neural Network, with given parameters.
 
void AddBasicLSTMLayer (TBasicLSTMLayer< Architecture_t > *basicLSTMLayer)
 Function for adding LSTM Layer in the Deep Neural Network, when the layer is already created.
 
TBasicRNNLayer< Architecture_t > * AddBasicRNNLayer (size_t stateSize, size_t inputSize, size_t timeSteps, bool rememberState=false, bool returnSequence=false, EActivationFunction f=EActivationFunction::kTanh)
 Function for adding Recurrent Layer in the Deep Neural Network, with given parameters.
 
void AddBasicRNNLayer (TBasicRNNLayer< Architecture_t > *basicRNNLayer)
 Function for adding Vanilla RNN when the layer is already created.
 
TBatchNormLayer< Architecture_t > * AddBatchNormLayer (Scalar_t momentum=-1, Scalar_t epsilon=0.0001)
 Function for adding a Batch Normalization layer with given parameters.
 
TConvLayer< Architecture_t > * AddConvLayer (size_t depth, size_t filterHeight, size_t filterWidth, size_t strideRows, size_t strideCols, size_t paddingHeight, size_t paddingWidth, EActivationFunction f, Scalar_t dropoutProbability=1.0)
 Function for adding Convolution layer in the Deep Neural Network, with a given depth, filter height and width, striding in rows and columns, the zero paddings, as well as the activation function and the dropout probability.
 
void AddConvLayer (TConvLayer< Architecture_t > *convLayer)
 Function for adding Convolution Layer in the Deep Neural Network, when the layer is already created.
 
TDenseLayer< Architecture_t > * AddDenseLayer (size_t width, EActivationFunction f, Scalar_t dropoutProbability=1.0)
 Function for adding Dense Connected Layer in the Deep Neural Network, with a given width, activation function and dropout probability.
 
void AddDenseLayer (TDenseLayer< Architecture_t > *denseLayer)
 Function for adding Dense Layer in the Deep Neural Network, when the layer is already created.
 
void AddMaxPoolLayer (CNN::TMaxPoolLayer< Architecture_t > *maxPoolLayer)
 Function for adding Max Pooling layer in the Deep Neural Network, when the layer is already created.
 
TMaxPoolLayer< Architecture_t > * AddMaxPoolLayer (size_t frameHeight, size_t frameWidth, size_t strideRows, size_t strideCols, Scalar_t dropoutProbability=1.0)
 Function for adding Pooling layer in the Deep Neural Network, with a given filter height and width, striding in rows and columns as well as the dropout probability.
 
TReshapeLayer< Architecture_t > * AddReshapeLayer (size_t depth, size_t height, size_t width, bool flattening)
 Function for adding Reshape Layer in the Deep Neural Network, with a given height and width.
 
void AddReshapeLayer (TReshapeLayer< Architecture_t > *reshapeLayer)
 Function for adding Reshape Layer in the Deep Neural Network, when the layer is already created.
 
void Backward (const Tensor_t &input, const Matrix_t &groundTruth, const Matrix_t &weights)
 Function that executes the entire backward pass in the network.
 
void Clear ()
 Remove all layers from the network.
 
void Forward (Tensor_t &input, bool applyDropout=false)
 Function that executes the entire forward pass in the network.
 
size_t GetBatchDepth () const
 
size_t GetBatchHeight () const
 
size_t GetBatchSize () const
 Getters.
 
size_t GetBatchWidth () const
 
size_t GetDepth () const
 
EInitialization GetInitialization () const
 
size_t GetInputDepth () const
 
size_t GetInputHeight () const
 
size_t GetInputWidth () const
 
Layer_t * GetLayerAt (size_t i)
 Get the layer in the vector of layers at poistion i.
 
const Layer_t * GetLayerAt (size_t i) const
 
std::vector< Layer_t * > & GetLayers ()
 
const std::vector< Layer_t * > & GetLayers () const
 
ELossFunction GetLossFunction () const
 
size_t GetOutputWidth () const
 
ERegularization GetRegularization () const
 
Scalar_t GetWeightDecay () const
 
void Initialize ()
 DAE functions.
 
bool IsTraining () const
 
Scalar_t Loss (const Matrix_t &groundTruth, const Matrix_t &weights, bool includeRegularization=true) const
 Function for evaluating the loss, based on the activations stored in the last layer.
 
Scalar_t Loss (Tensor_t &input, const Matrix_t &groundTruth, const Matrix_t &weights, bool inTraining=false, bool includeRegularization=true)
 Function for evaluating the loss, based on the propagation of the given input.
 
void Prediction (Matrix_t &predictions, EOutputFunction f) const
 Prediction based on activations stored in the last layer.
 
void Prediction (Matrix_t &predictions, Tensor_t &input, EOutputFunction f)
 Prediction for the given inputs, based on what network learned.
 
void Print () const
 Print the Deep Net Info.
 
Scalar_t RegularizationTerm () const
 Function for computing the regularizaton term to be added to the loss function

 
void ResetTraining ()
 Function that reset some training flags after looping all the events but not the weights.
 
void SetBatchDepth (size_t batchDepth)
 
void SetBatchHeight (size_t batchHeight)
 
void SetBatchSize (size_t batchSize)
 Setters.
 
void SetBatchWidth (size_t batchWidth)
 
void SetDropoutProbabilities (const std::vector< Double_t > &probabilities)
 
void SetInitialization (EInitialization I)
 
void SetInputDepth (size_t inputDepth)
 
void SetInputHeight (size_t inputHeight)
 
void SetInputWidth (size_t inputWidth)
 
void SetLossFunction (ELossFunction J)
 
void SetRegularization (ERegularization R)
 
void SetWeightDecay (Scalar_t weightDecay)
 
void Update (Scalar_t learningRate)
 Function that will update the weights and biases in the layers that contain weights and biases.
 

Private Member Functions

size_t calculateDimension (int imgDim, int fltDim, int padding, int stride)
 
bool isInteger (Scalar_t x) const
 

Private Attributes

size_t fBatchDepth
 The depth of the batch used for training/testing.
 
size_t fBatchHeight
 The height of the batch used for training/testing.
 
size_t fBatchSize
 Batch size used for training and evaluation.
 
size_t fBatchWidth
 The width of the batch used for training/testing.
 
EInitialization fI
 The initialization method of the network.
 
size_t fInputDepth
 The depth of the input.
 
size_t fInputHeight
 The height of the input.
 
size_t fInputWidth
 The width of the input.
 
bool fIsTraining
 Is the network training?
 
ELossFunction fJ
 The loss function of the network.
 
std::vector< Layer_t * > fLayers
 The layers consisting the DeepNet.
 
ERegularization fR
 The regularization used for the network.
 
Scalar_t fWeightDecay
 The weight decay factor.
 

#include <TMVA/DNN/DeepNet.h>

Member Typedef Documentation

◆ Matrix_t

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
using TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Matrix_t = typename Architecture_t::Matrix_t

Definition at line 77 of file DeepNet.h.

◆ Scalar_t

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
using TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Scalar_t = typename Architecture_t::Scalar_t

Definition at line 78 of file DeepNet.h.

◆ Tensor_t

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
using TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Tensor_t = typename Architecture_t::Tensor_t

Definition at line 76 of file DeepNet.h.

Constructor & Destructor Documentation

◆ TDeepNet() [1/3]

template<typename Architecture_t , typename Layer_t >
TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::TDeepNet

Default Constructor.

Definition at line 378 of file DeepNet.h.

◆ TDeepNet() [2/3]

template<typename Architecture_t , typename Layer_t >
TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::TDeepNet ( size_t  BatchSize,
size_t  InputDepth,
size_t  InputHeight,
size_t  InputWidth,
size_t  BatchDepth,
size_t  BatchHeight,
size_t  BatchWidth,
ELossFunction  fJ,
EInitialization  fI = EInitialization::kZero,
ERegularization  fR = ERegularization::kNone,
Scalar_t  fWeightDecay = 0.0,
bool  isTraining = false 
)

Constructor.

Definition at line 388 of file DeepNet.h.

◆ TDeepNet() [3/3]

template<typename Architecture_t , typename Layer_t >
TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::TDeepNet ( const TDeepNet< Architecture_t, Layer_t > &  deepNet)

Copy-constructor.

Definition at line 400 of file DeepNet.h.

◆ ~TDeepNet()

template<typename Architecture_t , typename Layer_t >
TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::~TDeepNet

Destructor.

Definition at line 411 of file DeepNet.h.

Member Function Documentation

◆ AddBasicGRULayer() [1/2]

template<typename Architecture_t , typename Layer_t >
TBasicGRULayer< Architecture_t > * TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddBasicGRULayer ( size_t  stateSize,
size_t  inputSize,
size_t  timeSteps,
bool  rememberState = false,
bool  returnSequence = false,
bool  resetGateAfter = false 
)

Function for adding GRU Layer in the Deep Neural Network, with given parameters.

Definition at line 608 of file DeepNet.h.

◆ AddBasicGRULayer() [2/2]

template<typename Architecture_t , typename Layer_t >
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddBasicGRULayer ( TBasicGRULayer< Architecture_t > *  basicGRULayer)

Function for adding GRU Layer in the Deep Neural Network, when the layer is already created.

Definition at line 641 of file DeepNet.h.

◆ AddBasicLSTMLayer() [1/2]

template<typename Architecture_t , typename Layer_t >
TBasicLSTMLayer< Architecture_t > * TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddBasicLSTMLayer ( size_t  stateSize,
size_t  inputSize,
size_t  timeSteps,
bool  rememberState = false,
bool  returnSequence = false 
)

Function for adding LSTM Layer in the Deep Neural Network, with given parameters.

Definition at line 567 of file DeepNet.h.

◆ AddBasicLSTMLayer() [2/2]

template<typename Architecture_t , typename Layer_t >
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddBasicLSTMLayer ( TBasicLSTMLayer< Architecture_t > *  basicLSTMLayer)

Function for adding LSTM Layer in the Deep Neural Network, when the layer is already created.

Definition at line 600 of file DeepNet.h.

◆ AddBasicRNNLayer() [1/2]

template<typename Architecture_t , typename Layer_t >
TBasicRNNLayer< Architecture_t > * TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddBasicRNNLayer ( size_t  stateSize,
size_t  inputSize,
size_t  timeSteps,
bool  rememberState = false,
bool  returnSequence = false,
EActivationFunction  f = EActivationFunction::kTanh 
)

Function for adding Recurrent Layer in the Deep Neural Network, with given parameters.

Definition at line 524 of file DeepNet.h.

◆ AddBasicRNNLayer() [2/2]

template<typename Architecture_t , typename Layer_t >
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddBasicRNNLayer ( TBasicRNNLayer< Architecture_t > *  basicRNNLayer)

Function for adding Vanilla RNN when the layer is already created.

Definition at line 560 of file DeepNet.h.

◆ AddBatchNormLayer()

template<typename Architecture_t , typename Layer_t >
TBatchNormLayer< Architecture_t > * TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddBatchNormLayer ( Scalar_t  momentum = -1,
Scalar_t  epsilon = 0.0001 
)

Function for adding a Batch Normalization layer with given parameters.

Definition at line 825 of file DeepNet.h.

◆ AddConvLayer() [1/2]

template<typename Architecture_t , typename Layer_t >
TConvLayer< Architecture_t > * TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddConvLayer ( size_t  depth,
size_t  filterHeight,
size_t  filterWidth,
size_t  strideRows,
size_t  strideCols,
size_t  paddingHeight,
size_t  paddingWidth,
EActivationFunction  f,
Scalar_t  dropoutProbability = 1.0 
)

Function for adding Convolution layer in the Deep Neural Network, with a given depth, filter height and width, striding in rows and columns, the zero paddings, as well as the activation function and the dropout probability.

Based on these parameters, it calculates the width and height of the convolutional layer.

Definition at line 439 of file DeepNet.h.

◆ AddConvLayer() [2/2]

template<typename Architecture_t , typename Layer_t >
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddConvLayer ( TConvLayer< Architecture_t > *  convLayer)

Function for adding Convolution Layer in the Deep Neural Network, when the layer is already created.


Definition at line 478 of file DeepNet.h.

◆ AddDenseLayer() [1/2]

template<typename Architecture_t , typename Layer_t >
TDenseLayer< Architecture_t > * TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddDenseLayer ( size_t  width,
EActivationFunction  f,
Scalar_t  dropoutProbability = 1.0 
)

Function for adding Dense Connected Layer in the Deep Neural Network, with a given width, activation function and dropout probability.

Based on the previous layer dimensions, it calculates the input width of the fully connected layer.

Definition at line 740 of file DeepNet.h.

◆ AddDenseLayer() [2/2]

template<typename Architecture_t , typename Layer_t >
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddDenseLayer ( TDenseLayer< Architecture_t > *  denseLayer)

Function for adding Dense Layer in the Deep Neural Network, when the layer is already created.

Definition at line 766 of file DeepNet.h.

◆ AddMaxPoolLayer() [1/2]

template<typename Architecture_t , typename Layer_t >
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddMaxPoolLayer ( CNN::TMaxPoolLayer< Architecture_t > *  maxPoolLayer)

Function for adding Max Pooling layer in the Deep Neural Network, when the layer is already created.

Definition at line 517 of file DeepNet.h.

◆ AddMaxPoolLayer() [2/2]

template<typename Architecture_t , typename Layer_t >
TMaxPoolLayer< Architecture_t > * TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddMaxPoolLayer ( size_t  frameHeight,
size_t  frameWidth,
size_t  strideRows,
size_t  strideCols,
Scalar_t  dropoutProbability = 1.0 
)

Function for adding Pooling layer in the Deep Neural Network, with a given filter height and width, striding in rows and columns as well as the dropout probability.

The depth is same as the previous layer depth. Based on these parameters, it calculates the width and height of the pooling layer.

Definition at line 485 of file DeepNet.h.

◆ AddReshapeLayer() [1/2]

template<typename Architecture_t , typename Layer_t >
TReshapeLayer< Architecture_t > * TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddReshapeLayer ( size_t  depth,
size_t  height,
size_t  width,
bool  flattening 
)

Function for adding Reshape Layer in the Deep Neural Network, with a given height and width.

It will take every matrix from the previous layer and reshape it to a matrix with new dimensions.

Definition at line 773 of file DeepNet.h.

◆ AddReshapeLayer() [2/2]

template<typename Architecture_t , typename Layer_t >
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::AddReshapeLayer ( TReshapeLayer< Architecture_t > *  reshapeLayer)

Function for adding Reshape Layer in the Deep Neural Network, when the layer is already created.

Definition at line 870 of file DeepNet.h.

◆ Backward()

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Backward ( const Tensor_t input,
const Matrix_t groundTruth,
const Matrix_t weights 
)

Function that executes the entire backward pass in the network.

Definition at line 1033 of file DeepNet.h.

◆ calculateDimension()

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::calculateDimension ( int  imgDim,
int  fltDim,
int  padding,
int  stride 
)
private

Definition at line 421 of file DeepNet.h.

◆ Clear()

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

Remove all layers from the network.

Definition at line 334 of file DeepNet.h.

◆ Forward()

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Forward ( Tensor_t input,
bool  applyDropout = false 
)

Function that executes the entire forward pass in the network.

Definition at line 896 of file DeepNet.h.

◆ GetBatchDepth()

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

Definition at line 342 of file DeepNet.h.

◆ GetBatchHeight()

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

Definition at line 343 of file DeepNet.h.

◆ GetBatchSize()

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

Getters.

Definition at line 337 of file DeepNet.h.

◆ GetBatchWidth()

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

Definition at line 344 of file DeepNet.h.

◆ GetDepth()

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

Definition at line 326 of file DeepNet.h.

◆ GetInitialization()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
EInitialization TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::GetInitialization ( ) const
inline

Definition at line 349 of file DeepNet.h.

◆ GetInputDepth()

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

Definition at line 338 of file DeepNet.h.

◆ GetInputHeight()

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

Definition at line 339 of file DeepNet.h.

◆ GetInputWidth()

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

Definition at line 340 of file DeepNet.h.

◆ GetLayerAt() [1/2]

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

Get the layer in the vector of layers at poistion i.

Definition at line 322 of file DeepNet.h.

◆ GetLayerAt() [2/2]

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

Definition at line 323 of file DeepNet.h.

◆ GetLayers() [1/2]

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

Definition at line 330 of file DeepNet.h.

◆ GetLayers() [2/2]

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

Definition at line 331 of file DeepNet.h.

◆ GetLossFunction()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
ELossFunction TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::GetLossFunction ( ) const
inline

Definition at line 348 of file DeepNet.h.

◆ GetOutputWidth()

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

Definition at line 327 of file DeepNet.h.

◆ GetRegularization()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
ERegularization TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::GetRegularization ( ) const
inline

Definition at line 350 of file DeepNet.h.

◆ GetWeightDecay()

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

Definition at line 351 of file DeepNet.h.

◆ Initialize()

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Initialize

DAE functions.

Function for initialization of the Neural Net.

Definition at line 877 of file DeepNet.h.

◆ isInteger()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
bool TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::isInteger ( Scalar_t  x) const
inlineprivate

Definition at line 82 of file DeepNet.h.

◆ IsTraining()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
bool TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::IsTraining ( ) const
inline

Definition at line 346 of file DeepNet.h.

◆ Loss() [1/2]

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Loss ( const Matrix_t groundTruth,
const Matrix_t weights,
bool  includeRegularization = true 
) const

Function for evaluating the loss, based on the activations stored in the last layer.

Definition at line 1263 of file DeepNet.h.

◆ Loss() [2/2]

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Loss ( Tensor_t input,
const Matrix_t groundTruth,
const Matrix_t weights,
bool  inTraining = false,
bool  includeRegularization = true 
)

Function for evaluating the loss, based on the propagation of the given input.

Definition at line 1279 of file DeepNet.h.

◆ Prediction() [1/2]

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Prediction ( Matrix_t predictions,
EOutputFunction  f 
) const

Prediction based on activations stored in the last layer.

Definition at line 1303 of file DeepNet.h.

◆ Prediction() [2/2]

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Prediction ( Matrix_t predictions,
Tensor_t input,
EOutputFunction  f 
)

Prediction for the given inputs, based on what network learned.

Definition at line 1311 of file DeepNet.h.

◆ Print()

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Print

Print the Deep Net Info.

Definition at line 1321 of file DeepNet.h.

◆ RegularizationTerm()

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::RegularizationTerm

Function for computing the regularizaton term to be added to the loss function

Definition at line 1289 of file DeepNet.h.

◆ ResetTraining()

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::ResetTraining

Function that reset some training flags after looping all the events but not the weights.

Definition at line 886 of file DeepNet.h.

◆ SetBatchDepth()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetBatchDepth ( size_t  batchDepth)
inline

Definition at line 361 of file DeepNet.h.

◆ SetBatchHeight()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetBatchHeight ( size_t  batchHeight)
inline

Definition at line 362 of file DeepNet.h.

◆ SetBatchSize()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetBatchSize ( size_t  batchSize)
inline

Setters.

Definition at line 357 of file DeepNet.h.

◆ SetBatchWidth()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetBatchWidth ( size_t  batchWidth)
inline

Definition at line 363 of file DeepNet.h.

◆ SetDropoutProbabilities()

template<typename Architecture_t , typename Layer_t >
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetDropoutProbabilities ( const std::vector< Double_t > &  probabilities)

Definition at line 1340 of file DeepNet.h.

◆ SetInitialization()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetInitialization ( EInitialization  I)
inline

Definition at line 365 of file DeepNet.h.

◆ SetInputDepth()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetInputDepth ( size_t  inputDepth)
inline

Definition at line 358 of file DeepNet.h.

◆ SetInputHeight()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetInputHeight ( size_t  inputHeight)
inline

Definition at line 359 of file DeepNet.h.

◆ SetInputWidth()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetInputWidth ( size_t  inputWidth)
inline

Definition at line 360 of file DeepNet.h.

◆ SetLossFunction()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetLossFunction ( ELossFunction  J)
inline

Definition at line 364 of file DeepNet.h.

◆ SetRegularization()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetRegularization ( ERegularization  R)
inline

Definition at line 366 of file DeepNet.h.

◆ SetWeightDecay()

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
void TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::SetWeightDecay ( Scalar_t  weightDecay)
inline

Definition at line 367 of file DeepNet.h.

◆ Update()

template<typename Architecture_t , typename Layer_t >
auto TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::Update ( Scalar_t  learningRate)

Function that will update the weights and biases in the layers that contain weights and biases.


Definition at line 1254 of file DeepNet.h.

Member Data Documentation

◆ fBatchDepth

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
size_t TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fBatchDepth
private

The depth of the batch used for training/testing.

Definition at line 93 of file DeepNet.h.

◆ fBatchHeight

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
size_t TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fBatchHeight
private

The height of the batch used for training/testing.

Definition at line 94 of file DeepNet.h.

◆ fBatchSize

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
size_t TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fBatchSize
private

Batch size used for training and evaluation.

Definition at line 88 of file DeepNet.h.

◆ fBatchWidth

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
size_t TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fBatchWidth
private

The width of the batch used for training/testing.

Definition at line 95 of file DeepNet.h.

◆ fI

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
EInitialization TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fI
private

The initialization method of the network.

Definition at line 100 of file DeepNet.h.

◆ fInputDepth

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
size_t TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fInputDepth
private

The depth of the input.

Definition at line 89 of file DeepNet.h.

◆ fInputHeight

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
size_t TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fInputHeight
private

The height of the input.

Definition at line 90 of file DeepNet.h.

◆ fInputWidth

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
size_t TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fInputWidth
private

The width of the input.

Definition at line 91 of file DeepNet.h.

◆ fIsTraining

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
bool TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fIsTraining
private

Is the network training?

Definition at line 97 of file DeepNet.h.

◆ fJ

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
ELossFunction TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fJ
private

The loss function of the network.

Definition at line 99 of file DeepNet.h.

◆ fLayers

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
std::vector<Layer_t *> TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fLayers
private

The layers consisting the DeepNet.

Definition at line 86 of file DeepNet.h.

◆ fR

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
ERegularization TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fR
private

The regularization used for the network.

Definition at line 101 of file DeepNet.h.

◆ fWeightDecay

template<typename Architecture_t , typename Layer_t = VGeneralLayer<Architecture_t>>
Scalar_t TMVA::DNN::TDeepNet< Architecture_t, Layer_t >::fWeightDecay
private

The weight decay factor.

Definition at line 102 of file DeepNet.h.

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