Use float instead of double in ceres' methods

1,027 views
Skip to first unread message

Ricard

unread,
Jun 21, 2012, 9:09:00 AM6/21/12
to ceres-...@googlegroups.com
Is there a way to use float parameters/variables instead of double in problem definitions?

Sameer Agarwal

unread,
Jun 21, 2012, 9:15:29 AM6/21/12
to ceres-...@googlegroups.com
Sorry but no. Too much pain and suffering in single precision land.
You are welcome to do your cost function computations in single precision and then convert to double, but I would not recommend it.
Sameer


On Thu, Jun 21, 2012 at 6:09 AM, Ricard <rica...@gmail.com> wrote:
Is there a way to use float parameters/variables instead of double in problem definitions?

--
-- ---------------------------------------- Ceres Solver Google Group http://groups.google.com/group/ceres-solver?hl=en?hl=en

Ricard Marxer

unread,
Jun 21, 2012, 9:16:56 AM6/21/12
to ceres-...@googlegroups.com
It's ok, I simply convert my data from and to float before and after
the ceres solving. It works just fine!
Thanks
--
ricard
http://twitter.com/ricardmp
http://www.ricardmarxer.com
http://www.caligraft.com

Sameer Agarwal

unread,
Jun 21, 2012, 9:44:27 AM6/21/12
to ceres-...@googlegroups.com
So this may work fine for auto/exact differentiation but for numeric differentiation this is definitely going to give you trouble.

Sameer

Ricard

unread,
Jun 21, 2012, 12:05:57 PM6/21/12
to ceres-...@googlegroups.com
Right, I went with the exact differentiation path, therefore no trouble here...


On Thursday, June 21, 2012 3:44:27 PM UTC+2, Sameer Agarwal wrote:
So this may work fine for auto/exact differentiation but for numeric differentiation this is definitely going to give you trouble.

Sameer
On Thu, Jun 21, 2012 at 6:16 AM, Ricard Marxer <> wrote:
It's ok, I simply convert my data from and to float before and after
the ceres solving.  It works just fine!
Thanks

On Thu, Jun 21, 2012 at 3:15 PM, Sameer Agarwal
<> wrote:
> Sorry but no. Too much pain and suffering in single precision land.
> You are welcome to do your cost function computations in single precision
> and then convert to double, but I would not recommend it.
> Sameer
>
>
> On Thu, Jun 21, 2012 at 6:09 AM, Ricard <> wrote:
>>
>> Is there a way to use float parameters/variables instead of double in
>> problem definitions?
>>
>> --
>> -- ---------------------------------------- Ceres Solver Google Group
>> http://groups.google.com/group/ceres-solver?hl=en?hl=en
>
>
> --
> -- ---------------------------------------- Ceres Solver Google Group
> http://groups.google.com/group/ceres-solver?hl=en?hl=en



rz_w

unread,
Mar 14, 2019, 10:37:38 AM3/14/19
to Ceres Solver
hi, i am doing the same thing as you, to convert ceres solver from double to float, would you please give some suggestions for avoiding some annoying troubles? thanks very much!

在 2012年6月21日星期四 UTC+8下午9:16:56,Ricard写道:
Reply all
Reply to author
Forward
0 new messages