-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Description
The ApproxEqual(float a, float b, float relative_tolerance = 0.001)
function used in testing, especially in cudamatrix/cu-math-test
doesn't handle the case when a
or b
are exactly 0
. In such a case, the test will always fail even with machine epsilon level round off error:
predicted_objf_change= [ 0 0 0 0 0 ], measured_objf_change= [ -9.53674e-07 0 0 0 0 ]
Some way of regularizing this close to 0
would have less false negatives maybe? This scikit-learn PR has some good suggestions: scikit-learn/scikit-learn#15007