Logo ROOT  
Reference Guide
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 75 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. More...
 
 TDeepNet (const TDeepNet &)
 Copy-constructor. More...
 
 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. More...
 
 ~TDeepNet ()
 Destructor. More...
 
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. More...
 
void AddBasicGRULayer (TBasicGRULayer< Architecture_t > *basicGRULayer)
 Function for adding GRU Layer in the Deep Neural Network, when the layer is already created. More...
 
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. More...
 
void AddBasicLSTMLayer (TBasicLSTMLayer< Architecture_t > *basicLSTMLayer)
 Function for adding LSTM Layer in the Deep Neural Network, when the layer is already created. More...
 
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. More...
 
void AddBasicRNNLayer (TBasicRNNLayer< Architecture_t > *basicRNNLayer)
 Function for adding Vanilla RNN when the layer is already created. More...
 
TBatchNormLayer< Architecture_t > * AddBatchNormLayer (Scalar_t momentum=-1, Scalar_t epsilon=0.0001)
 Function for adding a Batch Normalization layer with given parameters. More...
 
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. More...
 
void AddConvLayer (TConvLayer< Architecture_t > *convLayer)
 Function for adding Convolution Layer in the Deep Neural Network, when the layer is already created. More...
 
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. More...
 
void AddDenseLayer (TDenseLayer< Architecture_t > *denseLayer)
 Function for adding Dense Layer in the Deep Neural Network, when the layer is already created. More...
 
void AddMaxPoolLayer (CNN::TMaxPoolLayer< Architecture_t > *maxPoolLayer)
 Function for adding Max Pooling layer in the Deep Neural Network, when the layer is already created. More...
 
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. More...
 
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. More...
 
void AddReshapeLayer (TReshapeLayer< Architecture_t > *reshapeLayer)
 Function for adding Reshape Layer in the Deep Neural Network, when the layer is already created. More...
 
void Backward (const Tensor_t &input, const Matrix_t &groundTruth, const Matrix_t &weights)
 Function that executes the entire backward pass in the network. More...
 
void Clear ()
 Remove all layers from the network. More...
 
void Forward (Tensor_t &input, bool applyDropout=false)
 Function that executes the entire forward pass in the network. More...
 
size_t GetBatchDepth () const
 
size_t GetBatchHeight () const
 
size_t GetBatchSize () const
 Getters. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void Prediction (Matrix_t &predictions, EOutputFunction f) const
 Prediction based on activations stored in the last layer. More...
 
void Prediction (Matrix_t &predictions, Tensor_t &input, EOutputFunction f)
 Prediction for the given inputs, based on what network learned. More...
 
void Print () const
 Print the Deep Net Info. More...
 
Scalar_t RegularizationTerm () const
 Function for computing the regularizaton term to be added to the loss function
More...
 
void ResetTraining ()
 Function that reset some training flags after looping all the events but not the weights. More...
 
void SetBatchDepth (size_t batchDepth)
 
void SetBatchHeight (size_t batchHeight)
 
void SetBatchSize (size_t batchSize)
 Setters. More...
 
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. More...
 

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

#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 79 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 80 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 78 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 380 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 390 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 402 of file DeepNet.h.

◆ ~TDeepNet()

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

Destructor.

Definition at line 413 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 610 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 643 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 569 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 602 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 526 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 562 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 827 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 441 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 480 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 742 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 768 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 519 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 487 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 775 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 872 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 1035 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 423 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 336 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 898 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 344 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 345 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 339 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 346 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 328 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 351 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 340 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 341 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 342 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 324 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 325 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 332 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 333 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 350 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 329 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 352 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 353 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 879 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 84 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 348 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 1265 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 1281 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 1305 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 1313 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 1323 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 1291 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 888 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 363 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 364 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 359 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 365 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 1342 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 367 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 360 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 361 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 362 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 366 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 368 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 369 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 1256 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 95 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 96 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 90 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 97 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 102 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 91 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 92 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 93 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 99 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 101 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 88 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 103 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 104 of file DeepNet.h.


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