L-BFGS(minFunc):Step direction is illegal

在使用minFunc实现的L-BFGS优化方法进行AutoEncoder时,提示Step direction is illegal,解决方法如下:

将图像的标准差归一化至1,即每个图像减去该图像的均值然后除以该图像的标准差。

即使按上述方式处理后依然提示如下所示的Warning,但是可以运行了。

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate.
RCOND =  1.617658e-20.
> In polyinterp at 88
  In WolfeLineSearch at 118
  In minFunc at 1044
  In stlExercise at 99
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate.
RCOND =  1.179263e-17.
> In polyinterp at 88
  In WolfeLineSearch at 118
  In minFunc at 1044
  In stlExercise at 99

参考链接:https://plus.google.com/100395942582606051248/posts/XT7C2d6H3kL#100395942582606051248/posts/XT7C2d6H3kL

你可能感兴趣的:(L-BFGS(minFunc):Step direction is illegal)