"tools/python/git@developer.sourcefind.cn:OpenDAS/dlib.git" did not exist on "c00edf8cb6701539bc97c28684de37894c4cc373"
Commit d951aaf2 authored by Davis King's avatar Davis King
Browse files

made test a little more reasonable

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403950
parent fd227644
...@@ -66,13 +66,13 @@ namespace ...@@ -66,13 +66,13 @@ namespace
T obj = find_min_trust_region(objective_delta_stop_strategy(1e-12, 100), rosen_function_model<T>(), p); T obj = find_min_trust_region(objective_delta_stop_strategy(1e-12, 100), rosen_function_model<T>(), p);
DLIB_TEST_MSG(std::abs(obj) < 1e-10, "obj: " << obj); DLIB_TEST_MSG(std::abs(obj) < 1e-10, "obj: " << obj);
DLIB_TEST_MSG(length(p-ans) < 1e-10, "length(p): " << length(p-ans)); DLIB_TEST_MSG(length(p-ans) < 1e-5, "length(p): " << length(p-ans));
matrix<T,0,1> p2 = 100*matrix_cast<T>(randm(2,1,rnd)) - 50; matrix<T,0,1> p2 = 100*matrix_cast<T>(randm(2,1,rnd)) - 50;
obj = find_max_trust_region(objective_delta_stop_strategy(1e-12, 100), neg_rosen_model<T>(), p2); obj = find_max_trust_region(objective_delta_stop_strategy(1e-12, 100), neg_rosen_model<T>(), p2);
DLIB_TEST_MSG(std::abs(obj) < 1e-10, "obj: " << obj); DLIB_TEST_MSG(std::abs(obj) < 1e-10, "obj: " << obj);
DLIB_TEST_MSG(length(p-ans) < 1e-10, "length(p): " << length(p-ans)); DLIB_TEST_MSG(length(p-ans) < 1e-5, "length(p): " << length(p-ans));
} }
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment