Logo ROOT   6.21/01
Reference Guide
TMVA::DNN::TCudnn< AFloat > Class Template Reference

template<typename AFloat = Float_t>
class TMVA::DNN::TCudnn< AFloat >

The TCudnn architecture class.

Low-level interface class for CUDA computing architectures using the cuDNN library as backend. Contains as public types the declaration of the scalar, matrix and buffer types for this architecture, as well as the remaining functions in the low-level interface in the form of static members.

Definition at line 55 of file TCudnn.h.

Classes

struct  CNNOptions
 

Public Types

using ActivationDescriptor_t = cudnnActivationDescriptor_t
 
using AlgorithmBackward_t = cudnnConvolutionBwdDataAlgo_t
 
using AlgorithmDataType_t = cudnnDataType_t
 
using AlgorithmForward_t = cudnnConvolutionFwdAlgo_t
 
using AlgorithmHelper_t = cudnnConvolutionBwdFilterAlgo_t
 
using BNormDescriptors_t = TDNNGenDescriptors< BNormLayer_t >
 
using BNormLayer_t = TBatchNormLayer< TCudnn< AFloat > >
 
using ConvDescriptors_t = CNN::TCNNDescriptors< ConvLayer_t >
 
using ConvLayer_t = CNN::TConvLayer< TCudnn< AFloat > >
 
using ConvolutionDescriptor_t = cudnnConvolutionDescriptor_t
 
using ConvWorkspace_t = CNN::TCNNWorkspace< ConvLayer_t >
 
using DeviceBuffer_t = TCudaDeviceBuffer< AFloat >
 
using DropoutDescriptor_t = cudnnDropoutDescriptor_t
 
using EmptyDescriptor_t = TCudnnEmptyDescriptor
 
using FilterDescriptor_t = cudnnFilterDescriptor_t
 
using HostBuffer_t = TCudaHostBuffer< AFloat >
 
using Matrix_t = TCudaTensor< AFloat >
 
using PoolingDescriptor_t = cudnnPoolingDescriptor_t
 
using PoolingDescriptors_t = CNN::TCNNDescriptors< PoolingLayer_t >
 
using PoolingLayer_t = CNN::TMaxPoolLayer< TCudnn< AFloat > >
 
using PoolingWorkspace_t = CNN::TCNNWorkspace< PoolingLayer_t >
 
using ReduceTensorDescriptor_t = cudnnReduceTensorDescriptor_t
 
using Scalar_t = AFloat
 
using Tensor_t = TCudaTensor< AFloat >
 
using TensorDescriptor_t = cudnnTensorDescriptor_t
 

Public Member Functions

template<typename ATensor >
void CopyDiffArch (TCudaTensor< AFloat > &B, const ATensor &A)
 
template<typename AMatrix >
void CopyWeightsDiffArch (TCudaTensor< AFloat > &B, const AMatrix &A)
 

Static Public Member Functions

static void ConvLayerForward (Tensor_t &output, Tensor_t &inputActivationFunc, const Tensor_t &input, const Matrix_t &weights, const Matrix_t &biases, const DNN::CNN::TConvParams &params, EActivationFunction activFunc, Tensor_t &, const ConvDescriptors_t &descriptors, ConvWorkspace_t &workspace)
 Forward propagation in the Convolutional layer. More...
 
static Tensor_t CreateTensor (size_t n, size_t c, size_t h, size_t w)
 
static Tensor_t CreateTensor (DeviceBuffer_t buffer, size_t n, size_t c, size_t h, size_t w)
 
static void CreateWeightTensors (std::vector< Matrix_t > &newWeights, const std::vector< Matrix_t > &weights)
 
static void FreeConvWorkspace (TWorkspace *workspace, ConvLayer_t *L=nullptr)
 
static void FreePoolDropoutWorkspace (TWorkspace *workspace, PoolingLayer_t *L=nullptr)
 
static TMVA::Experimental::MemoryLayout GetTensorLayout ()
 
static void InitializeActivationDescriptor (ActivationDescriptor_t &descriptors, EActivationFunction activFunc, double coef=0.0)
 
static void InitializeBNormDescriptors (TDescriptors *&descriptors, BNormLayer_t *L=nullptr)
 
static void InitializeConvDescriptors (TDescriptors *&descriptors, ConvLayer_t *L=nullptr)
 
static void InitializeConvWorkspace (TWorkspace *&workspace, TDescriptors *&descriptors, const DNN::CNN::TConvParams &params, ConvLayer_t *L=nullptr)
 
static void InitializePoolDescriptors (TDescriptors *&descriptors, PoolingLayer_t *L=nullptr)
 
static void InitializePoolDropoutWorkspace (TWorkspace *&workspace, TDescriptors *&descriptors, const DNN::CNN::TConvParams &params, PoolingLayer_t *L=nullptr)
 
static void PrepareInternals (Tensor_t &)
 Dummy placeholder - preparation is currently only required for the CUDA architecture. More...
 
static void ReleaseBNormDescriptors (TDescriptors *descriptors)
 
static void ReleaseConvDescriptors (TDescriptors *descriptors)
 
static void ReleaseDescriptor (EmptyDescriptor_t &emptyDescr)
 
static void ReleaseDescriptor (ActivationDescriptor_t &activationDescr)
 
static void ReleaseDescriptor (ConvolutionDescriptor_t &convolutionDescr)
 
static void ReleaseDescriptor (DropoutDescriptor_t &dropoutDescr)
 
static void ReleaseDescriptor (FilterDescriptor_t &filterDescr)
 
static void ReleaseDescriptor (PoolingDescriptor_t &poolingDescr)
 
static void ReleaseDescriptor (TensorDescriptor_t &tensorDescr)
 
static void ReleasePoolDescriptors (TDescriptors *descriptors)
 
Forward Propagation

Low-level functions required for the forward propagation of activations through the network.

static void MultiplyTranspose (Tensor_t &output, const Tensor_t &input, const Matrix_t &weights)
 Matrix-multiply input with the transpose of and write the results into output. More...
 
static void AddRowWise (Tensor_t &output, const Matrix_t &biases)
 Add the vectors biases row-wise to the matrix output. More...
 
Backward Propagation (Dense Layers)

Low-level functions required for the forward propagation of activations through the network.

static void Backward (Tensor_t &activationGradientsBackward, Matrix_t &weightGradients, Matrix_t &biasGradients, Tensor_t &df, const Tensor_t &activationGradients, const Matrix_t &weights, const Tensor_t &activationBackward)
 Perform the complete backward propagation step. More...
 
static void ScaleAdd (Tensor_t &A, const Tensor_t &B, Scalar_t alpha=1.0, Scalar_t beta=1.0)
 Above functions extended to vectors. More...
 
static void Copy (Tensor_t &A, const Tensor_t &B)
 Deep copy from B to A. More...
 
template<typename ATensor_t >
static void CopyDiffArch (Tensor_t &A, const ATensor_t &B)
 
template<typename ATensor_t >
static void CopyWeightsDiffArch (Tensor_t &A, const ATensor_t &B)
 
static void CopyDiffArch (Tensor_t A, const Tensor_t &B)
 
template<typename AMatrix_t >
static void CopyDiffArch (std::vector< Tensor_t > &A, const std::vector< AMatrix_t > &B)
 
Activation Functions

For each activation function, the low-level interface contains two routines.

One that applies the acitvation function to a matrix and one that evaluate the derivatives of the activation function at the elements of a given matrix and writes the results into the result matrix.

static void Identity (Tensor_t &X)
 
static void IdentityDerivative (Tensor_t &dX, Tensor_t &X, Tensor_t &Y, Tensor_t &dY, ActivationDescriptor_t activationDescr, const AFloat alpha=1, const AFloat beta=1)
 
static void ActivationFunctionForward (Tensor_t &X, EActivationFunction activFunct, const ActivationDescriptor_t activationDescr, const double coef=0.0, const AFloat alpha=1, const AFloat beta=0)
 
static void ActivationFunctionForward (Tensor_t &Y, const Tensor_t &X, EActivationFunction activFunct, const ActivationDescriptor_t activationDescr, const double coef=0.0, const AFloat alpha=1, const AFloat beta=0)
 
static void ActivationFunctionBackward (Tensor_t &dX, const Tensor_t &Y, const Tensor_t &dY, const Tensor_t &X, EActivationFunction activFunct, const ActivationDescriptor_t activationDescr, const AFloat alpha=1, const AFloat beta=0)
 Computes the gradient of the activation function. More...
 
static void SymmetricReluDerivative (Tensor_t &B, const Tensor_t &A)
 
static void SoftSignDerivative (Tensor_t &B, const Tensor_t &A)
 
static void GaussDerivative (Tensor_t &B, const Tensor_t &A)
 
Loss Functions

Loss functions compute a scalar value given the output of the network for a given training input and the expected network prediction Y that quantifies the quality of the prediction.

For each function also a routing that computes the gradients (suffixed by Gradients) must be provided for the starting of the backpropagation algorithm.

static Scalar_t MeanSquaredError (const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
 
static void MeanSquaredErrorGradients (Matrix_t &dY, const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
 
static Scalar_t CrossEntropy (const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
 Sigmoid transformation is implicitly applied, thus output should hold the linear activations of the last layer in the net. More...
 
static void CrossEntropyGradients (Matrix_t &dY, const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
 
static Scalar_t SoftmaxCrossEntropy (const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
 Softmax transformation is implicitly applied, thus output should hold the linear activations of the last layer in the net. More...
 
static void SoftmaxCrossEntropyGradients (Matrix_t &dY, const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
 
Output Functions

Output functions transform the activations output of the output layer in the network to a valid prediction YHat for the desired usage of the network, e.g.

the identity function for regression or the sigmoid transformation for two-class classification.

static void Sigmoid (Matrix_t &YHat, const Matrix_t &)
 
static void Softmax (Matrix_t &YHat, const Matrix_t &)
 
Dropout
static void DropoutForward (Tensor_t &A, TDescriptors *descriptors, TWorkspace *workspace, Scalar_t p)
 Apply dropout with activation probability p to the given tensor A and scale the result by reciprocal of p. More...
 
static void DropoutBackward (Tensor_t &A, TDescriptors *descriptors, TWorkspace *workspace)
 
static void Dropout (Tensor_t &A, Scalar_t p)
 Apply dropout with activation probability p to the given tensor A and scale the result by reciprocal of p. More...
 
Batch Normalization Layer Propagation
static void BatchNormLayerForwardTraining (int axis, const Tensor_t &x, Tensor_t &y, Matrix_t &gamma, Matrix_t &beta, Matrix_t &mean, Matrix_t &, Matrix_t &iVariance, Matrix_t &runningMeans, Matrix_t &runningVars, Scalar_t nTrainedBatches, Scalar_t momentum, Scalar_t epsilon, const TensorDescriptor_t &bnParDescriptor)
 The input from each batch are normalized during training to have zero mean and unit variance and they are then scaled by two parameter, different for each input variable: More...
 
static void BatchNormLayerForwardInference (int axis, const Tensor_t &x, Matrix_t &gamma, Matrix_t &beta, Tensor_t &y, const Matrix_t &runningMeans, const Matrix_t &runningVars, Scalar_t epsilon, const TensorDescriptor_t &)
 During inference the inputs are not normalized using the batch mean but the previously computed at running mean and variance. More...
 
static void BatchNormLayerBackward (int axis, const Tensor_t &x, const Tensor_t &dy, Tensor_t &dx, Matrix_t &gamma, Matrix_t &dgamma, Matrix_t &dbeta, const Matrix_t &mean, const Matrix_t &variance, const Matrix_t &iVariance, Scalar_t epsilon, const TensorDescriptor_t &)
 
Regularization

For each regularization type two functions are required, one named <Type>Regularization that evaluates the corresponding regularization functional for a given weight matrix and the Add<Type>RegularizationGradients, that adds the regularization component in the gradients to the provided matrix.

static Scalar_t L1Regularization (const Matrix_t &W)
 
static void AddL1RegularizationGradients (Matrix_t &A, const Matrix_t &W, Scalar_t weightDecay)
 
static Scalar_t L2Regularization (const Matrix_t &W)
 
static void AddL2RegularizationGradients (Matrix_t &A, const Matrix_t &W, Scalar_t weightDecay)
 
Initialization

For each initialization method, one function in the low-level interface is provided.

The naming scheme is

Initialize<Type>

for a given initialization method Type.

static void InitializeGauss (Matrix_t &A)
 
static void InitializeUniform (Matrix_t &A)
 
static void InitializeIdentity (Matrix_t &A)
 
static void InitializeZero (Matrix_t &A)
 
static void InitializeGlorotNormal (Matrix_t &A)
 
static void InitializeGlorotUniform (Matrix_t &A)
 
static TRandomGetRandomGenerator ()
 
static void SetRandomSeed (size_t seed)
 
Forward Propagation in Convolutional Layer
static void AddConvBiases (Matrix_t &output, const Matrix_t &biases)
 Add the biases in the Convolutional Layer. More...
 
Backward Propagation in Convolutional Layer
static void ConvLayerBackward (Tensor_t &activationGradientsBackward, Matrix_t &weightGradients, Matrix_t &biasGradients, Tensor_t &inputActivation, Tensor_t &activationGradients, const Matrix_t &weights, const Tensor_t &activationBackward, const Tensor_t &outputTensor, EActivationFunction activFunc, const ConvDescriptors_t &descriptors, ConvWorkspace_t &workspace, size_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t)
 Perform the complete backward propagation step in a Convolutional Layer. More...
 
Forward Propagation in Max Pooling Layer
static void Downsample (Tensor_t &A, Tensor_t &, const Tensor_t &C, const PoolingDescriptors_t &descriptors, PoolingWorkspace_t &workspace, size_t imgHeight, size_t imgWidth, size_t fltHeight, size_t fltWidth, size_t strideRows, size_t strideCols)
 Downsample the matrix C to the matrix A, using max operation, such that the winning indices are stored in matrix B. More...
 
Backward Propagation in Max Pooling Layer
static void MaxPoolLayerBackward (Tensor_t &activationGradientsBackward, const Tensor_t &activationGradients, const Tensor_t &, const Tensor_t &inputActivation, const Tensor_t &outputTensor, const PoolingDescriptors_t &descriptors, PoolingWorkspace_t &workspace, size_t imgHeight, size_t imgWidth, size_t fltHeight, size_t fltWidth, size_t strideRows, size_t strideCols, size_t nLocalViews)
 Perform the complete backward propagation step in a Pooling Layer. More...
 
Forward and Backward Propagation in Reshape Layer
static void Flatten (Tensor_t &A, const Tensor_t &B)
 Transform the matrix B to a matrix with different dimensions A. More...
 
static void Deflatten (Tensor_t &A, const Tensor_t &B)
 Transforms each row of B to a matrix and stores it in the tensor B. More...
 
static void Rearrange (Tensor_t &out, const Tensor_t &in)
 Rearrage data accoring to time fill B x T x D out with T x B x D matrix in. More...
 
static Matrix_tRecurrentLayerBackward (Matrix_t &state_gradients_backward, Matrix_t &, Matrix_t &, Matrix_t &, Matrix_t &, const Matrix_t &, const Matrix_t &, const Matrix_t &, const Matrix_t &, Matrix_t &)
 Backward pass for Recurrent Networks. More...
 
Additional Arithmetic Functions

Additional arithmetic on CUDA matrices used to implement the low-level interface.

static void Hadamard (Tensor_t &A, const Tensor_t &B)
 In-place Hadamard (element-wise) product of matrices A and B with the result being written into A. More...
 
static Scalar_t Sum (const Matrix_t &A, Scalar_t alpha=1.0, Scalar_t beta=0.0)
 Compute the sum of all elements in A. More...
 
static void ConstAdd (Matrix_t &A, Scalar_t beta)
 Check two matrices for equality, taking floating point arithmetic errors into account. More...
 
static void ConstMult (Matrix_t &A, Scalar_t beta)
 Multiply the constant beta to all the elements of matrix A and write the result into A. More...
 
static void ReciprocalElementWise (Matrix_t &A)
 Reciprocal each element of the matrix A and write the result into A. More...
 
static void SquareElementWise (Matrix_t &A)
 Square each element of the matrix A and write the result into A. More...
 
static void SqrtElementWise (Matrix_t &A)
 Square root each element of the matrix A and write the result into A. More...
 
static void AdamUpdate (Matrix_t &A, const Matrix_t &M, const Matrix_t &V, Scalar_t alpha, Scalar_t eps)
 
static void AdamUpdateFirstMom (Matrix_t &A, const Matrix_t &B, Scalar_t beta)
 
static void AdamUpdateSecondMom (Matrix_t &A, const Matrix_t &B, Scalar_t beta)
 
static void PrintTensor (const Tensor_t &A, const std::string name="tensor", bool=false)
 
static void SumRows (Matrix_t &B, const Matrix_t &A)
 extra functions defined only for CPU architecture !!! More...
 

Static Private Attributes

static TRandomfgRandomGen
 

#include <TMVA/DNN/Architectures/TCudnn.h>

Member Typedef Documentation

◆ ActivationDescriptor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::ActivationDescriptor_t = cudnnActivationDescriptor_t

Definition at line 68 of file TCudnn.h.

◆ AlgorithmBackward_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::AlgorithmBackward_t = cudnnConvolutionBwdDataAlgo_t

Definition at line 76 of file TCudnn.h.

◆ AlgorithmDataType_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::AlgorithmDataType_t = cudnnDataType_t

Definition at line 78 of file TCudnn.h.

◆ AlgorithmForward_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::AlgorithmForward_t = cudnnConvolutionFwdAlgo_t

Definition at line 75 of file TCudnn.h.

◆ AlgorithmHelper_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::AlgorithmHelper_t = cudnnConvolutionBwdFilterAlgo_t

Definition at line 77 of file TCudnn.h.

◆ BNormDescriptors_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::BNormDescriptors_t = TDNNGenDescriptors<BNormLayer_t>

Definition at line 85 of file TCudnn.h.

◆ BNormLayer_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::BNormLayer_t = TBatchNormLayer<TCudnn<AFloat> >

Definition at line 84 of file TCudnn.h.

◆ ConvDescriptors_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::ConvDescriptors_t = CNN::TCNNDescriptors<ConvLayer_t>

Definition at line 88 of file TCudnn.h.

◆ ConvLayer_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::ConvLayer_t = CNN::TConvLayer<TCudnn<AFloat> >

Definition at line 87 of file TCudnn.h.

◆ ConvolutionDescriptor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::ConvolutionDescriptor_t = cudnnConvolutionDescriptor_t

Definition at line 69 of file TCudnn.h.

◆ ConvWorkspace_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::ConvWorkspace_t = CNN::TCNNWorkspace<ConvLayer_t>

Definition at line 89 of file TCudnn.h.

◆ DeviceBuffer_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::DeviceBuffer_t = TCudaDeviceBuffer<AFloat>

Definition at line 64 of file TCudnn.h.

◆ DropoutDescriptor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::DropoutDescriptor_t = cudnnDropoutDescriptor_t

Definition at line 70 of file TCudnn.h.

◆ EmptyDescriptor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::EmptyDescriptor_t = TCudnnEmptyDescriptor

Definition at line 82 of file TCudnn.h.

◆ FilterDescriptor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::FilterDescriptor_t = cudnnFilterDescriptor_t

Definition at line 71 of file TCudnn.h.

◆ HostBuffer_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::HostBuffer_t = TCudaHostBuffer<AFloat>

Definition at line 65 of file TCudnn.h.

◆ Matrix_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::Matrix_t = TCudaTensor<AFloat>

Definition at line 62 of file TCudnn.h.

◆ PoolingDescriptor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::PoolingDescriptor_t = cudnnPoolingDescriptor_t

Definition at line 73 of file TCudnn.h.

◆ PoolingDescriptors_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::PoolingDescriptors_t = CNN::TCNNDescriptors<PoolingLayer_t>

Definition at line 91 of file TCudnn.h.

◆ PoolingLayer_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::PoolingLayer_t = CNN::TMaxPoolLayer<TCudnn<AFloat> >

Definition at line 90 of file TCudnn.h.

◆ PoolingWorkspace_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::PoolingWorkspace_t = CNN::TCNNWorkspace<PoolingLayer_t>

Definition at line 92 of file TCudnn.h.

◆ ReduceTensorDescriptor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::ReduceTensorDescriptor_t = cudnnReduceTensorDescriptor_t

Definition at line 79 of file TCudnn.h.

◆ Scalar_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::Scalar_t = AFloat

Definition at line 61 of file TCudnn.h.

◆ Tensor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::Tensor_t = TCudaTensor<AFloat>

Definition at line 63 of file TCudnn.h.

◆ TensorDescriptor_t

template<typename AFloat = Float_t>
using TMVA::DNN::TCudnn< AFloat >::TensorDescriptor_t = cudnnTensorDescriptor_t

Definition at line 80 of file TCudnn.h.

Member Function Documentation

◆ ActivationFunctionBackward()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ActivationFunctionBackward ( Tensor_t dX,
const Tensor_t Y,
const Tensor_t dY,
const Tensor_t X,
EActivationFunction  activFunct,
const ActivationDescriptor_t  activationDescr,
const AFloat  alpha = 1,
const AFloat  beta = 0 
)
static

Computes the gradient of the activation function.

◆ ActivationFunctionForward() [1/2]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ActivationFunctionForward ( Tensor_t X,
EActivationFunction  activFunct,
const ActivationDescriptor_t  activationDescr,
const double  coef = 0.0,
const AFloat  alpha = 1,
const AFloat  beta = 0 
)
static

◆ ActivationFunctionForward() [2/2]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ActivationFunctionForward ( Tensor_t Y,
const Tensor_t X,
EActivationFunction  activFunct,
const ActivationDescriptor_t  activationDescr,
const double  coef = 0.0,
const AFloat  alpha = 1,
const AFloat  beta = 0 
)
static

◆ AdamUpdate()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::AdamUpdate ( Matrix_t A,
const Matrix_t M,
const Matrix_t V,
Scalar_t  alpha,
Scalar_t  eps 
)
inlinestatic

Definition at line 667 of file TCudnn.h.

◆ AdamUpdateFirstMom()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::AdamUpdateFirstMom ( Matrix_t A,
const Matrix_t B,
Scalar_t  beta 
)
inlinestatic

Definition at line 673 of file TCudnn.h.

◆ AdamUpdateSecondMom()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::AdamUpdateSecondMom ( Matrix_t A,
const Matrix_t B,
Scalar_t  beta 
)
inlinestatic

Definition at line 678 of file TCudnn.h.

◆ AddConvBiases()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::AddConvBiases ( Matrix_t output,
const Matrix_t biases 
)
static

Add the biases in the Convolutional Layer.

◆ AddL1RegularizationGradients()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::AddL1RegularizationGradients ( Matrix_t A,
const Matrix_t W,
Scalar_t  weightDecay 
)
inlinestatic

Definition at line 410 of file TCudnn.h.

◆ AddL2RegularizationGradients()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::AddL2RegularizationGradients ( Matrix_t A,
const Matrix_t W,
Scalar_t  weightDecay 
)
inlinestatic

Definition at line 422 of file TCudnn.h.

◆ AddRowWise()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::AddRowWise ( Tensor_t output,
const Matrix_t biases 
)
static

Add the vectors biases row-wise to the matrix output.

◆ Backward()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Backward ( Tensor_t activationGradientsBackward,
Matrix_t weightGradients,
Matrix_t biasGradients,
Tensor_t df,
const Tensor_t activationGradients,
const Matrix_t weights,
const Tensor_t activationBackward 
)
static

Perform the complete backward propagation step.

If the provided activationGradientsBackward matrix is not empty, compute the gradients of the objective function with respect to the activations of the previous layer (backward direction). Also compute the weight and the bias gradients. Modifies the values in df and thus produces only a valid result, if it is applied the first time after the corresponding forward propagation has been per- formed.

◆ BatchNormLayerBackward()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::BatchNormLayerBackward ( int  axis,
const Tensor_t x,
const Tensor_t dy,
Tensor_t dx,
Matrix_t gamma,
Matrix_t dgamma,
Matrix_t dbeta,
const Matrix_t mean,
const Matrix_t variance,
const Matrix_t iVariance,
Scalar_t  epsilon,
const TensorDescriptor_t  
)
static

◆ BatchNormLayerForwardInference()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::BatchNormLayerForwardInference ( int  axis,
const Tensor_t x,
Matrix_t gamma,
Matrix_t beta,
Tensor_t y,
const Matrix_t runningMeans,
const Matrix_t runningVars,
Scalar_t  epsilon,
const TensorDescriptor_t  
)
static

During inference the inputs are not normalized using the batch mean but the previously computed at running mean and variance.

◆ BatchNormLayerForwardTraining()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::BatchNormLayerForwardTraining ( int  axis,
const Tensor_t x,
Tensor_t y,
Matrix_t gamma,
Matrix_t beta,
Matrix_t mean,
Matrix_t ,
Matrix_t iVariance,
Matrix_t runningMeans,
Matrix_t runningVars,
Scalar_t  nTrainedBatches,
Scalar_t  momentum,
Scalar_t  epsilon,
const TensorDescriptor_t bnParDescriptor 
)
static

The input from each batch are normalized during training to have zero mean and unit variance and they are then scaled by two parameter, different for each input variable:

  • a scale factor gamma
  • an offset beta

◆ ConstAdd()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ConstAdd ( Matrix_t A,
Scalar_t  beta 
)
inlinestatic

Check two matrices for equality, taking floating point arithmetic errors into account.

Add the constant beta to all the elements of matrix A and write the result into A.

Definition at line 628 of file TCudnn.h.

◆ ConstMult()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ConstMult ( Matrix_t A,
Scalar_t  beta 
)
inlinestatic

Multiply the constant beta to all the elements of matrix A and write the result into A.

Definition at line 636 of file TCudnn.h.

◆ ConvLayerBackward()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ConvLayerBackward ( Tensor_t activationGradientsBackward,
Matrix_t weightGradients,
Matrix_t biasGradients,
Tensor_t inputActivation,
Tensor_t activationGradients,
const Matrix_t weights,
const Tensor_t activationBackward,
const Tensor_t outputTensor,
EActivationFunction  activFunc,
const ConvDescriptors_t descriptors,
ConvWorkspace_t workspace,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
size_t   
)
static

Perform the complete backward propagation step in a Convolutional Layer.

If the provided activationGradientsBackward matrix is not empty, compute the gradients of the objective function with respect to the activations of the previous layer (backward direction). Also compute the weight and the bias gradients. Modifies the values in df and thus produces only a valid result, if it is applied the first time after the corresponding forward propagation has been per- formed.

◆ ConvLayerForward()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ConvLayerForward ( Tensor_t output,
Tensor_t inputActivationFunc,
const Tensor_t input,
const Matrix_t weights,
const Matrix_t biases,
const DNN::CNN::TConvParams params,
EActivationFunction  activFunc,
Tensor_t ,
const ConvDescriptors_t descriptors,
ConvWorkspace_t workspace 
)
static

Forward propagation in the Convolutional layer.

◆ Copy()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Copy ( Tensor_t A,
const Tensor_t B 
)
static

Deep copy from B to A.

◆ CopyDiffArch() [1/4]

template<typename AFloat = Float_t>
template<typename ATensor_t >
static void TMVA::DNN::TCudnn< AFloat >::CopyDiffArch ( Tensor_t A,
const ATensor_t &  B 
)
static

◆ CopyDiffArch() [2/4]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::CopyDiffArch ( Tensor_t  A,
const Tensor_t B 
)
inlinestatic

Definition at line 221 of file TCudnn.h.

◆ CopyDiffArch() [3/4]

template<typename AFloat >
template<typename AMatrix_t >
void TMVA::DNN::TCudnn< AFloat >::CopyDiffArch ( std::vector< Tensor_t > &  A,
const std::vector< AMatrix_t > &  B 
)
static

Definition at line 753 of file TCudnn.h.

◆ CopyDiffArch() [4/4]

template<typename AFloat = Float_t>
template<typename ATensor >
void TMVA::DNN::TCudnn< AFloat >::CopyDiffArch ( TCudaTensor< AFloat > &  B,
const ATensor &  A 
)

Definition at line 705 of file TCudnn.h.

◆ CopyWeightsDiffArch() [1/2]

template<typename AFloat = Float_t>
template<typename ATensor_t >
static void TMVA::DNN::TCudnn< AFloat >::CopyWeightsDiffArch ( Tensor_t A,
const ATensor_t &  B 
)
static

◆ CopyWeightsDiffArch() [2/2]

template<typename AFloat = Float_t>
template<typename AMatrix >
void TMVA::DNN::TCudnn< AFloat >::CopyWeightsDiffArch ( TCudaTensor< AFloat > &  B,
const AMatrix &  A 
)

Definition at line 734 of file TCudnn.h.

◆ CreateTensor() [1/2]

template<typename AFloat = Float_t>
static Tensor_t TMVA::DNN::TCudnn< AFloat >::CreateTensor ( size_t  n,
size_t  c,
size_t  h,
size_t  w 
)
inlinestatic

Definition at line 111 of file TCudnn.h.

◆ CreateTensor() [2/2]

template<typename AFloat = Float_t>
static Tensor_t TMVA::DNN::TCudnn< AFloat >::CreateTensor ( DeviceBuffer_t  buffer,
size_t  n,
size_t  c,
size_t  h,
size_t  w 
)
inlinestatic

Definition at line 115 of file TCudnn.h.

◆ CreateWeightTensors()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::CreateWeightTensors ( std::vector< Matrix_t > &  newWeights,
const std::vector< Matrix_t > &  weights 
)
inlinestatic

Definition at line 121 of file TCudnn.h.

◆ CrossEntropy()

template<typename AFloat = Float_t>
static Scalar_t TMVA::DNN::TCudnn< AFloat >::CrossEntropy ( const Matrix_t Y,
const Matrix_t output,
const Matrix_t weights 
)
static

Sigmoid transformation is implicitly applied, thus output should hold the linear activations of the last layer in the net.

◆ CrossEntropyGradients()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::CrossEntropyGradients ( Matrix_t dY,
const Matrix_t Y,
const Matrix_t output,
const Matrix_t weights 
)
static

◆ Deflatten()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Deflatten ( Tensor_t A,
const Tensor_t B 
)
static

Transforms each row of B to a matrix and stores it in the tensor B.

◆ Downsample()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Downsample ( Tensor_t A,
Tensor_t ,
const Tensor_t C,
const PoolingDescriptors_t descriptors,
PoolingWorkspace_t workspace,
size_t  imgHeight,
size_t  imgWidth,
size_t  fltHeight,
size_t  fltWidth,
size_t  strideRows,
size_t  strideCols 
)
static

Downsample the matrix C to the matrix A, using max operation, such that the winning indices are stored in matrix B.

No winning indices needed for cuDNN.

◆ Dropout()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Dropout ( Tensor_t A,
Scalar_t  p 
)
inlinestatic

Apply dropout with activation probability p to the given tensor A and scale the result by reciprocal of p.

Definition at line 468 of file TCudnn.h.

◆ DropoutBackward()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::DropoutBackward ( Tensor_t A,
TDescriptors descriptors,
TWorkspace workspace 
)
static

◆ DropoutForward()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::DropoutForward ( Tensor_t A,
TDescriptors descriptors,
TWorkspace workspace,
Scalar_t  p 
)
static

Apply dropout with activation probability p to the given tensor A and scale the result by reciprocal of p.

◆ Flatten()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Flatten ( Tensor_t A,
const Tensor_t B 
)
static

Transform the matrix B to a matrix with different dimensions A.

Flattens the tensor B, such that each matrix, is stretched in one row, resulting with a matrix A.

◆ FreeConvWorkspace()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::FreeConvWorkspace ( TWorkspace workspace,
ConvLayer_t L = nullptr 
)
static

◆ FreePoolDropoutWorkspace()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::FreePoolDropoutWorkspace ( TWorkspace workspace,
PoolingLayer_t L = nullptr 
)
static

◆ GaussDerivative()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::GaussDerivative ( Tensor_t B,
const Tensor_t A 
)
inlinestatic

Definition at line 278 of file TCudnn.h.

◆ GetRandomGenerator()

template<typename AFloat = Float_t>
static TRandom& TMVA::DNN::TCudnn< AFloat >::GetRandomGenerator ( )
static

◆ GetTensorLayout()

template<typename AFloat = Float_t>
static TMVA::Experimental::MemoryLayout TMVA::DNN::TCudnn< AFloat >::GetTensorLayout ( )
inlinestatic

Definition at line 108 of file TCudnn.h.

◆ Hadamard()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Hadamard ( Tensor_t A,
const Tensor_t B 
)
inlinestatic

In-place Hadamard (element-wise) product of matrices A and B with the result being written into A.

Definition at line 604 of file TCudnn.h.

◆ Identity()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Identity ( Tensor_t X)
inlinestatic

Definition at line 241 of file TCudnn.h.

◆ IdentityDerivative()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::IdentityDerivative ( Tensor_t dX,
Tensor_t X,
Tensor_t Y,
Tensor_t dY,
ActivationDescriptor_t  activationDescr,
const AFloat  alpha = 1,
const AFloat  beta = 1 
)
inlinestatic

Definition at line 242 of file TCudnn.h.

◆ InitializeActivationDescriptor()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeActivationDescriptor ( ActivationDescriptor_t descriptors,
EActivationFunction  activFunc,
double  coef = 0.0 
)
static

◆ InitializeBNormDescriptors()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeBNormDescriptors ( TDescriptors *&  descriptors,
BNormLayer_t L = nullptr 
)
static

◆ InitializeConvDescriptors()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeConvDescriptors ( TDescriptors *&  descriptors,
ConvLayer_t L = nullptr 
)
static

◆ InitializeConvWorkspace()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeConvWorkspace ( TWorkspace *&  workspace,
TDescriptors *&  descriptors,
const DNN::CNN::TConvParams params,
ConvLayer_t L = nullptr 
)
static

◆ InitializeGauss()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeGauss ( Matrix_t A)
static

◆ InitializeGlorotNormal()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeGlorotNormal ( Matrix_t A)
static

◆ InitializeGlorotUniform()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeGlorotUniform ( Matrix_t A)
static

◆ InitializeIdentity()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeIdentity ( Matrix_t A)
static

◆ InitializePoolDescriptors()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializePoolDescriptors ( TDescriptors *&  descriptors,
PoolingLayer_t L = nullptr 
)
static

◆ InitializePoolDropoutWorkspace()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializePoolDropoutWorkspace ( TWorkspace *&  workspace,
TDescriptors *&  descriptors,
const DNN::CNN::TConvParams params,
PoolingLayer_t L = nullptr 
)
static

◆ InitializeUniform()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeUniform ( Matrix_t A)
static

◆ InitializeZero()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::InitializeZero ( Matrix_t A)
static

◆ L1Regularization()

template<typename AFloat = Float_t>
static Scalar_t TMVA::DNN::TCudnn< AFloat >::L1Regularization ( const Matrix_t W)
inlinestatic

Definition at line 405 of file TCudnn.h.

◆ L2Regularization()

template<typename AFloat = Float_t>
static Scalar_t TMVA::DNN::TCudnn< AFloat >::L2Regularization ( const Matrix_t W)
inlinestatic

Definition at line 417 of file TCudnn.h.

◆ MaxPoolLayerBackward()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::MaxPoolLayerBackward ( Tensor_t activationGradientsBackward,
const Tensor_t activationGradients,
const Tensor_t ,
const Tensor_t inputActivation,
const Tensor_t outputTensor,
const PoolingDescriptors_t descriptors,
PoolingWorkspace_t workspace,
size_t  imgHeight,
size_t  imgWidth,
size_t  fltHeight,
size_t  fltWidth,
size_t  strideRows,
size_t  strideCols,
size_t  nLocalViews 
)
static

Perform the complete backward propagation step in a Pooling Layer.

Based on the input to and output from the MaxPoolLayer, the gradients for the winning pixels are computed.

◆ MeanSquaredError()

template<typename AFloat = Float_t>
static Scalar_t TMVA::DNN::TCudnn< AFloat >::MeanSquaredError ( const Matrix_t Y,
const Matrix_t output,
const Matrix_t weights 
)
static

◆ MeanSquaredErrorGradients()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::MeanSquaredErrorGradients ( Matrix_t dY,
const Matrix_t Y,
const Matrix_t output,
const Matrix_t weights 
)
static

◆ MultiplyTranspose()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::MultiplyTranspose ( Tensor_t output,
const Tensor_t input,
const Matrix_t weights 
)
static

Matrix-multiply input with the transpose of and write the results into output.

◆ PrepareInternals()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::PrepareInternals ( Tensor_t )
inlinestatic

Dummy placeholder - preparation is currently only required for the CUDA architecture.

Definition at line 486 of file TCudnn.h.

◆ PrintTensor()

template<typename AFloat = Float_t>
void TMVA::DNN::TCudnn< AFloat >::PrintTensor ( const Tensor_t A,
const std::string  name = "tensor",
bool  = false 
)
static

Definition at line 762 of file TCudnn.h.

◆ Rearrange()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Rearrange ( Tensor_t out,
const Tensor_t in 
)
inlinestatic

Rearrage data accoring to time fill B x T x D out with T x B x D matrix in.

Definition at line 572 of file TCudnn.h.

◆ ReciprocalElementWise()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReciprocalElementWise ( Matrix_t A)
inlinestatic

Reciprocal each element of the matrix A and write the result into A.

Definition at line 644 of file TCudnn.h.

◆ RecurrentLayerBackward()

template<typename AFloat = Float_t>
static Matrix_t& TMVA::DNN::TCudnn< AFloat >::RecurrentLayerBackward ( Matrix_t state_gradients_backward,
Matrix_t ,
Matrix_t ,
Matrix_t ,
Matrix_t ,
const Matrix_t ,
const Matrix_t ,
const Matrix_t ,
const Matrix_t ,
Matrix_t  
)
inlinestatic

Backward pass for Recurrent Networks.

Definition at line 575 of file TCudnn.h.

◆ ReleaseBNormDescriptors()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseBNormDescriptors ( TDescriptors descriptors)
static

◆ ReleaseConvDescriptors()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseConvDescriptors ( TDescriptors descriptors)
static

◆ ReleaseDescriptor() [1/7]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseDescriptor ( EmptyDescriptor_t emptyDescr)
inlinestatic

Definition at line 146 of file TCudnn.h.

◆ ReleaseDescriptor() [2/7]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseDescriptor ( ActivationDescriptor_t activationDescr)
static

◆ ReleaseDescriptor() [3/7]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseDescriptor ( ConvolutionDescriptor_t convolutionDescr)
static

◆ ReleaseDescriptor() [4/7]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseDescriptor ( DropoutDescriptor_t dropoutDescr)
static

◆ ReleaseDescriptor() [5/7]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseDescriptor ( FilterDescriptor_t filterDescr)
static

◆ ReleaseDescriptor() [6/7]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseDescriptor ( PoolingDescriptor_t poolingDescr)
static

◆ ReleaseDescriptor() [7/7]

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleaseDescriptor ( TensorDescriptor_t tensorDescr)
static

◆ ReleasePoolDescriptors()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ReleasePoolDescriptors ( TDescriptors descriptors)
static

◆ ScaleAdd()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::ScaleAdd ( Tensor_t A,
const Tensor_t B,
Scalar_t  alpha = 1.0,
Scalar_t  beta = 1.0 
)
static

Above functions extended to vectors.

◆ SetRandomSeed()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::SetRandomSeed ( size_t  seed)
static

◆ Sigmoid()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Sigmoid ( Matrix_t YHat,
const Matrix_t  
)
static

◆ Softmax()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::Softmax ( Matrix_t YHat,
const Matrix_t  
)
static

◆ SoftmaxCrossEntropy()

template<typename AFloat = Float_t>
static Scalar_t TMVA::DNN::TCudnn< AFloat >::SoftmaxCrossEntropy ( const Matrix_t Y,
const Matrix_t output,
const Matrix_t weights 
)
static

Softmax transformation is implicitly applied, thus output should hold the linear activations of the last layer in the net.

◆ SoftmaxCrossEntropyGradients()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::SoftmaxCrossEntropyGradients ( Matrix_t dY,
const Matrix_t Y,
const Matrix_t output,
const Matrix_t weights 
)
static

◆ SoftSignDerivative()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::SoftSignDerivative ( Tensor_t B,
const Tensor_t A 
)
inlinestatic

Definition at line 274 of file TCudnn.h.

◆ SqrtElementWise()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::SqrtElementWise ( Matrix_t A)
inlinestatic

Square root each element of the matrix A and write the result into A.

Definition at line 661 of file TCudnn.h.

◆ SquareElementWise()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::SquareElementWise ( Matrix_t A)
inlinestatic

Square each element of the matrix A and write the result into A.

Definition at line 652 of file TCudnn.h.

◆ Sum()

template<typename AFloat = Float_t>
static Scalar_t TMVA::DNN::TCudnn< AFloat >::Sum ( const Matrix_t A,
Scalar_t  alpha = 1.0,
Scalar_t  beta = 0.0 
)
static

Compute the sum of all elements in A.

◆ SumRows()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::SumRows ( Matrix_t B,
const Matrix_t A 
)
static

extra functions defined only for CPU architecture !!!

Sum rows of (m x n) matrix A and write the results into the first m elements in B.

◆ SymmetricReluDerivative()

template<typename AFloat = Float_t>
static void TMVA::DNN::TCudnn< AFloat >::SymmetricReluDerivative ( Tensor_t B,
const Tensor_t A 
)
inlinestatic

Definition at line 270 of file TCudnn.h.

Member Data Documentation

◆ fgRandomGen

template<typename AFloat = Float_t>
TRandom* TMVA::DNN::TCudnn< AFloat >::fgRandomGen
staticprivate

Definition at line 58 of file TCudnn.h.


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