2

I'm using scipy.optimize.minimize to solve/calculate 3768 variables in 314 affine transformations to transform one point cloud to another eval_fun, firstly I tried using scipy.optimize.fmin_l_bfgs_b with approx_grad to avoid implementing gradient but it kept crashing with ABNORMAL_TERMINATION_IN_LNSRCH. Then I implemented gradient func and started using minimize and it still crashes with the same error.

res = minimize(eval_func,
               x0=np.array(M),
               method='L-BFGS-B',
               args=(scan_pts, scan_fce, scan_nrm, scan_mar, temp_pts, temp_fce, temp_nrm, temp_mar, alfa, beta, gama,edges),
               options={'iprint' : 99, 'maxiter' : 100}, jac=True)

This Is complete output:

This problem is unconstrained.

 Line search cannot locate an adequate point after 20 function
  and gradient evaluations.  Previous x, f and g restored.
 Possible causes: 1 error in function or gradient evaluation;
                  2 rounding error dominate computation.
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =         3768     M =           10

At X0         0 variables are exactly at the bounds

At iterate    0    f=  1.88129D-01    |proj g|=  9.98119D-01


ITERATION     1

---------------- CAUCHY entered-------------------
 There are            0   breakpoints 

 GCP found in this segment
Piece      1 --f1, f2 at start point  -9.3847D+02  9.3847D+02
Distance to the stationary point =   1.0000D+00

---------------- exit CAUCHY----------------------

        3768  variables are free at GCP            1

           * * *

Tit   = total number of iterations
Tnf   = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip  = number of BFGS updates skipped
Nact  = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F     = final function value

           * * *

   N    Tit     Tnf  Tnint  Skip  Nact     Projg        F
 3768      1     21      1     0     0   9.981D-01   1.881D-01
  F =  0.18812870968000006     

ABNORMAL_TERMINATION_IN_LNSRCH                              

I tried changing all values as said here: scipy.optimize.fmin_l_bfgs_b returns 'ABNORMAL_TERMINATION_IN_LNSRCH' but none of them work

What can I do?

ValueError
  • 21
  • 2

0 Answers0