26template<
typename AFloat>
45 auto reduction = [](
const std::vector<AFloat> &
v )
47 return std::accumulate(
v.begin(),
v.end(),AFloat{});
59template<
typename AFloat>
65 AFloat *
dataB = B.GetRawDataPointer();
66 const AFloat *
dataA = A.GetRawDataPointer();
78 AFloat
sign = (
dataA[i] < 0.0) ? -1.0 : 1.0;
97template<
typename AFloat>
117 auto reduction = [](
const std::vector<AFloat> &
v )
119 return std::accumulate(
v.begin(),
v.end(),AFloat{});
131template<
typename AFloat>
137 AFloat *
dataB = B.GetRawDataPointer();
138 const AFloat *
dataA = A.GetRawDataPointer();
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
static size_t GetNWorkItems(size_t nelements)
static Scalar_t L1Regularization(const Matrix_t &W)
static void AddL1RegularizationGradients(Matrix_t &A, const Matrix_t &W, Scalar_t weightDecay)
static Scalar_t L2Regularization(const Matrix_t &W)
static void AddL2RegularizationGradients(Matrix_t &A, const Matrix_t &W, Scalar_t weightDecay)
double weightDecay(double error, ItWeight itWeight, ItWeight itWeightEnd, double factorWeightDecay, EnumRegularization eRegularization)
compute the weight decay for regularization (L1 or L2)
create variable transformations