Qualify calls to some functions from <cmath>.
PiperOrigin-RevId: 239062617
This commit is contained in:
parent
d79bb04e2a
commit
eadaa54417
@ -15,6 +15,7 @@
|
||||
#include "tensorflow/contrib/tensor_forest/hybrid/core/ops/utils.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
#include "tensorflow/core/lib/random/philox_random.h"
|
||||
@ -36,7 +37,7 @@ float LeftProbability(const Tensor& point, const Tensor& weight, float bias,
|
||||
|
||||
// TODO(thomaswc): At some point we should consider
|
||||
// //learning/logistic/logodds-to-prob.h
|
||||
return 1.0 / (1.0 + exp(-dot_product + bias));
|
||||
return 1.0 / (1.0 + std::exp(-dot_product + bias));
|
||||
}
|
||||
|
||||
float LeftProbabilityK(const Tensor& point, std::vector<int32> feature_set,
|
||||
@ -54,7 +55,7 @@ float LeftProbabilityK(const Tensor& point, std::vector<int32> feature_set,
|
||||
|
||||
// TODO(thomaswc): At some point we should consider
|
||||
// //learning/logistic/logodds-to-prob.h
|
||||
return 1.0 / (1.0 + exp(-dot_product + bias));
|
||||
return 1.0 / (1.0 + std::exp(-dot_product + bias));
|
||||
}
|
||||
|
||||
void GetFeatureSet(int32 tree_num, int32 node_num, int32 random_seed,
|
||||
|
Loading…
Reference in New Issue
Block a user