mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
Replace pow with std::pow
The C pow casts to double while std::pow has overloads that can be optimized by the compiler. Also replace pow(*, 1./3) by cbrt.
This commit is contained in:
@@ -276,7 +276,7 @@ public:
|
||||
{
|
||||
int n1 = layer_sizes[i-1];
|
||||
int n2 = layer_sizes[i];
|
||||
double val = 0, G = n2 > 2 ? 0.7*pow((double)n1,1./(n2-1)) : 1.;
|
||||
double val = 0, G = n2 > 2 ? 0.7*std::pow(n1,1./(n2-1)) : 1.;
|
||||
double* w = weights[i].ptr<double>();
|
||||
|
||||
// initialize weights using Nguyen-Widrow algorithm
|
||||
|
||||
Reference in New Issue
Block a user