Logo ROOT   6.10/09
Reference Guide
TestBackpropagationCuda.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 // CUDA architectures. //
15 ////////////////////////////////////////////////////////////////////
16 
17 #include <iostream>
19 #include "TMatrix.h"
20 #include "TestBackpropagation.h"
21 
22 using namespace TMVA::DNN;
23 
24 int main()
25 {
26  using Scalar_t = Double_t;
27 
28  std::cout << "Testing Backpropagation:" << std::endl;
29  double error;
30  error = testBackpropagationWeightsLinear<TCuda<Scalar_t>>(1.0);
31  if (error > 1e-3)
32  return 1;
33  error = testBackpropagationL1Regularization<TCuda<Scalar_t>>(1e-2);
34  if (error > 1e-3)
35  return 1;
36  error = testBackpropagationL2Regularization<TCuda<Scalar_t>>(1.0);
37  if (error > 1e-3)
38  return 1;
39  error = testBackpropagationBiasesLinear<TCuda<Scalar_t>>(1.0);
40  if (error > 1e-3)
41  return 1;
42  return 0;
43 }
Definition: Blas.h:58
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