[SciPy-User] fmin_bfgs stuck in infinite loop

Johann Cohen-Tanugi johann.cohentanugi at gmail.com
Tue Oct 25 07:34:41 EDT 2011


I also note that scalar_search_wolfe2 has a maxiter cluase (maxiter=10 
hardcoded there), which scalar_search_wolfe1 doesn't.

J

On 10/25/2011 11:46 AM, Pauli Virtanen wrote:
> 24.10.2011 19:50, Johann Cohen-Tanugi kirjoitti:
> [clip]
>>      while 1:
>>          stp, phi1, derphi1, task = minpack2.dcsrch(alpha1, phi1, derphi1,
>>                                                     c1, c2, xtol, task,
>>                                                     amin, amax, isave, dsave)
>>          if task[:2] == asbytes('FG') and not np.isnan(phi1):
>>              alpha1 = stp
>>              phi1 = phi(stp)
>>              derphi1 = derphi(stp)
>>          else:
>>              break
> Looks correct to me. It should bail out from the loop on encountering
> a nan, as in that case it's unlikely it's possible to satisfy the wolfe
> conditions.
>



More information about the SciPy-User mailing list