Logo ROOT   6.10/09
Reference Guide
TestBackpropagationCpu.cxx
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Simon Pfreundschuh
3 
4 /*************************************************************************
5  * Copyright (C) 2016, Simon Pfreundschuh *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 ////////////////////////////////////////////////////////////////////
13 // Concrete instantiation of the generic backpropagation test for //
14 // multi-threaded CPU architectures. //
15 ////////////////////////////////////////////////////////////////////
16 
17 #include "TMatrix.h"
19 #include "TestBackpropagation.h"
20 
21 using namespace TMVA::DNN;
22 
23 int main()
24 {
25  using Scalar_t = Double_t;
26  std::cout << "Testing Backpropagation:" << std::endl;
27 
28  double error;
29  int iret = 0;
30 
31  error = testBackpropagationWeightsLinear<TCpu<Scalar_t>>(1.0);
32  if (error > 1e-3)
33  iret++;
34 
35  error = testBackpropagationL1Regularization<TCpu<Scalar_t>>(1e-2);
36  if (error > 1e-3)
37  iret++;
38 
39  error = testBackpropagationL2Regularization<TCpu<Scalar_t>>(1.0);
40  if (error > 1e-3)
41  iret++;
42 
43  error = testBackpropagationBiasesLinear<TCpu<Scalar_t>>(1.0);
44  if (error > 1e-3)
45  iret++;
46 
47  return iret;
48 }
Definition: Blas.h:58
int main()
double Double_t
Definition: RtypesCore.h:55
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630