18 #ifndef TMVA_DNN_ARCHITECTURES_REFERENCE 19 #define TMVA_DNN_ARCHITECTURES_REFERENCE 36 template<
typename AReal>
static void MeanSquaredErrorGradients(TMatrixT< AReal > &dY, const TMatrixT< AReal > &Y, const TMatrixT< AReal > &output)
static void TanhDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void IdentityDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void SoftmaxCrossEntropyGradients(TMatrixT< AReal > &dY, const TMatrixT< AReal > &Y, const TMatrixT< AReal > &output)
static void MultiplyTranspose(TMatrixT< Scalar_t > &output, const TMatrixT< Scalar_t > &input, const TMatrixT< Scalar_t > &weights)
Matrix-multiply input with the transpose of and write the results into output.
static void Tanh(TMatrixT< AReal > &B)
static void CrossEntropyGradients(TMatrixT< AReal > &dY, const TMatrixT< AReal > &Y, const TMatrixT< AReal > &output)
static void Sigmoid(TMatrixT< AReal > &B)
static void SigmoidDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void SoftSign(TMatrixT< AReal > &B)
static void Identity(TMatrixT< AReal > &B)
static void Backward(TMatrixT< Scalar_t > &activationGradientsBackward, TMatrixT< Scalar_t > &weightGradients, TMatrixT< Scalar_t > &biasGradients, TMatrixT< Scalar_t > &df, const TMatrixT< Scalar_t > &activationGradients, const TMatrixT< Scalar_t > &weights, const TMatrixT< Scalar_t > &activationBackward)
Perform the complete backward propagation step.
static void AddRowWise(TMatrixT< Scalar_t > &output, const TMatrixT< Scalar_t > &biases)
Add the vectors biases row-wise to the matrix output.
static void SymmetricReluDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
double beta(double x, double y)
Calculates the beta function.
static void AddL2RegularizationGradients(TMatrixT< AReal > &A, const TMatrixT< AReal > &W, AReal weightDecay)
double weightDecay(double error, ItWeight itWeight, ItWeight itWeightEnd, double factorWeightDecay, EnumRegularization eRegularization)
compute the weight decay for regularization (L1 or L2)
The reference architecture class.
static AReal SoftmaxCrossEntropy(const TMatrixT< AReal > &Y, const TMatrixT< AReal > &output)
Softmax transformation is implicitly applied, thus output should hold the linear activations of the l...
static AReal L1Regularization(const TMatrixT< AReal > &W)
static void InitializeUniform(TMatrixT< AReal > &A)
static void AddL1RegularizationGradients(TMatrixT< AReal > &A, const TMatrixT< AReal > &W, AReal weightDecay)
static void Relu(TMatrixT< AReal > &B)
static void SymmetricRelu(TMatrixT< AReal > &B)
static void InitializeZero(TMatrixT< AReal > &A)
static void ScaleAdd(TMatrixT< Scalar_t > &A, const TMatrixT< Scalar_t > &B, Scalar_t beta=1.0)
Adds a the elements in matrix B scaled by c to the elements in the matrix A.
static AReal L2Regularization(const TMatrixT< AReal > &W)
static AReal CrossEntropy(const TMatrixT< AReal > &Y, const TMatrixT< AReal > &output)
Sigmoid transformation is implicitly applied, thus output should hold the linear activations of the l...
static void ReluDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void GaussDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void Softmax(TMatrixT< AReal > &YHat, const TMatrixT< AReal > &)
static void Copy(TMatrixT< Scalar_t > &A, const TMatrixT< Scalar_t > &B)
static void InitializeIdentity(TMatrixT< AReal > &A)
static void SoftSignDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
Abstract ClassifierFactory template that handles arbitrary types.
static void InitializeGauss(TMatrixT< AReal > &A)
static AReal MeanSquaredError(const TMatrixT< AReal > &Y, const TMatrixT< AReal > &output)
static void Gauss(TMatrixT< AReal > &B)
static void Dropout(TMatrixT< AReal > &A, AReal dropoutProbability)
Apply dropout with activation probability p to the given matrix A and scale the result by reciprocal ...