Logo ROOT   6.07/09
Reference Guide
OutputFunctions.cxx
Go to the documentation of this file.
1 // @(#)root/tmva/tmva/dnn:$Id$
2 // Author: Simon Pfreundschuh 21/07/16
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 // Implementation of output functions for multi-threaded CPU //
14 // architectures. //
15 ///////////////////////////////////////////////////////////////
16 
18 
19 namespace TMVA
20 {
21 namespace DNN
22 {
23 
24 template<typename AFloat>
25 void TCpu<AFloat>::Sigmoid(TCpuMatrix<AFloat> & B,
26  const TCpuMatrix<AFloat> & A)
27 {
28  auto f = [](AFloat x) {return 1.0 / (1.0 + exp(-x));};
29  B.MapFrom(f, A);
30 }
31 
32 } // namespace DNN
33 } // namespace TMVA
static double B[]
static void Sigmoid(TCpuMatrix< Scalar_t > &B)
static double A[]
Double_t x[n]
Definition: legend1.C:17
double f(double x)
Abstract ClassifierFactory template that handles arbitrary types.
double exp(double)