24 template<
typename AFloat>
26 const TCpuMatrix<AFloat> &
A)
28 auto f = [](AFloat
x) {
return 1.0 / (1.0 +
exp(-
x));};
32 template<
typename AFloat>
41 auto f = [&dataA, &dataB,
n,
m](
UInt_t workerID)
44 for (
size_t i = 0; i <
n; i++) {
45 sum +=
exp(dataA[workerID + i * m]);
47 for (
size_t i = 0; i <
n; i++) {
48 dataB[workerID + i *
m] =
exp(dataA[workerID + i * m]) /
sum;
static void Sigmoid(TCpuMatrix< Scalar_t > &B)
static long int sum(long int i)
AFloat * GetRawDataPointer()
Return raw pointer to the elements stored contiguously in column-major order.
A pseudo container class which is a generator of indices.
ROOT::TThreadExecutor & GetThreadExecutor() const
Abstract ClassifierFactory template that handles arbitrary types.
auto Map(F func, unsigned nTimes) -> std::vector< typename std::result_of< F()>::type >
Execute func (with no arguments) nTimes in parallel.
static void Softmax(TCpuMatrix< Scalar_t > &YHat, const TCpuMatrix< Scalar_t > &)