NUMERICAL_FAILURE NumericDiffCostFunction

89 views
Skip to first unread message

bigpe...@gmail.com

unread,
Jun 25, 2016, 7:55:47 AM6/25/16
to Ceres Solver
Hi,Sameer,
Currently, I encounter a NUMERICAL_FAILURE problem using NumericDiffCostFunction. The implemented code seems to have no problems. Is it a bug or my issue? Can you tell me how to solve it?
Pengpeng

Sameer Agarwal

unread,
Jun 25, 2016, 10:57:35 AM6/25/16
to Ceres Solver
Pengpeng,
That is not enough information to diagnose the problem.
Sameer


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/b38545e5-0e20-4ecf-bfa7-68e0e1c65546%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bigpe...@gmail.com

unread,
Jun 25, 2016, 8:00:51 PM6/25/16
to Ceres Solver
Hi, Sameer,
I am doing some work about 3D body model statistics, and I have a PCA coefficient vector parameter with 140 elements. But I just want to optimize for only 30 PCA coefficients, I stacked the 30 PCA coefficients into a vector.When I run the code, it shows NUMERICAL_FALURE, and it does't solve my parameters at all. It runs at 0 iteration. 
The framework I use worked successfully for other purposes before.There are little information about how to solve this online. Thanks.
Pengpeng

在 2016年6月25日星期六 UTC+1下午3:57:35,Sameer Agarwal写道:

Sameer Agarwal

unread,
Jun 25, 2016, 8:16:04 PM6/25/16
to Ceres Solver
Pengpeng,
run the solver with -logtostderr -v=3 and share the output.
Sameer


bigpe...@gmail.com

unread,
Jun 26, 2016, 6:28:35 PM6/26/16
to Ceres Solver
Hi,Sameer,
I add "google::ParseCommandLineFlags(&argc, &argv, true);" before "google::InitGoogleLogging(argv[0]);" and I add "-logtostderr -v=3" in the command Arguments. Then I got "Error: unknown command line flag 'logtostderr' ".  One guy online reported that he fix this error by reducing the value of v, but it does not work for me. My platform is vs2013. Please tell me how to fix it. Thanks.
Pengpeng

在 2016年6月26日星期日 UTC+1上午1:16:04,Sameer Agarwal写道:

Sameer Agarwal

unread,
Jun 26, 2016, 7:39:18 PM6/26/16
to Ceres Solver, alex...@gmail.com
Pengpeng,
I know nothing about windows build. +Alex Stewart maybe able to help you there.
Sameer


Alex Stewart

unread,
Jun 27, 2016, 5:28:40 AM6/27/16
to ceres-...@googlegroups.com
Pengpeng,

What options did you build Ceres with?  Did you enable the MINIGLOG option in CMake?  If so, then flags like -logtostderr will indeed not be declared, as they are only present in the full version of glog.

-Alex

bigpe...@gmail.com

unread,
Jun 28, 2016, 7:12:23 AM6/28/16
to Ceres Solver
Hi,Alex,
I rebuild Ceres with glog , and new error disappears now :"Error 1 error LNK2001: unresolved external symbol "unsigned int __cdecl google::ParseCommandLineFlags(int *,char * * *,bool)" (?ParseCommandLineFlags@google@@YAIPAHPAPAPAD_N@Z). Do you know how to fix it?
By the way, during my new rebuilding, I also meet a error "Error C4996 'j0': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _j0. See online help for details. XXXXX\include\ceres\jet.h" ,which is labeled as a bug. But it is solved by  adding _CRT_NONSTDC_NO_DEPRECATE to the preprocessor definitions in my test.  You can see it here:  https://github.com/ceres-solver/ceres-solver/issues/190
在 2016年6月27日星期一 UTC+1上午10:28:40,Lex写道:

bigpe...@gmail.com

unread,
Jun 28, 2016, 9:05:16 AM6/28/16
to Ceres Solver
Hi,
It is "Residual and Jacobian evaluation failed". How should I fix it? Thanks.
Pengpeng



在 2016年6月27日星期一 UTC+1上午10:28:40,Lex写道:
Pengpeng,

Sameer Agarwal

unread,
Jul 1, 2016, 3:22:13 AM7/1/16
to Ceres Solver
now that you have glog working, a more detailed log will help diagnose this.

Reply all
Reply to author
Forward
0 new messages