ROOT
6.07/09
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
tmva
tmva
src
DNN
Architectures
Cpu
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
17
#include "
TMVA/DNN/Architectures/Cpu.h
"
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
ROOT::Math::Cephes::B
static double B[]
Definition:
SpecFuncCephes.cxx:178
TMVA::DNN::TCpu::Sigmoid
static void Sigmoid(TCpuMatrix< Scalar_t > &B)
Cpu.h
ROOT::Math::Cephes::A
static double A[]
Definition:
SpecFuncCephes.cxx:170
x
Double_t x[n]
Definition:
legend1.C:17
f
double f(double x)
Definition:
testIntegration.cxx:12
TMVA
Abstract ClassifierFactory template that handles arbitrary types.
Definition:
GeneticMinimizer.h:21
exp
double exp(double)