Code from BasicOptimizer.scala:75 executed in 6.74 seconds (0.345 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    IterativeTrainer.wrap(trainable)
      .setOrientation(orientation())
      .setMonitor(new TrainingMonitor() {
        override def clear(): Unit = trainingMonitor.clear()
  
        override def log(msg: String): Unit = trainingMonitor.log(msg)
  
        override def onStepFail(currentPoint: Step): Boolean = {
          BasicOptimizer.this.onStepFail(trainable, currentPoint)
        }
  
        override def onStepComplete(currentPoint: Step): Unit = {
          if (0 < logEvery && (0 == currentPoint.iteration % logEvery || currentPoint.iteration < logEvery)) {
            val image = currentImage
            timelineAnimation += image
            val caption = "Iteration " + currentPoint.iteration
            out.p(caption + "\n" + out.jpg(image, caption))
          }
          BasicOptimizer.this.onStepComplete(trainable, currentPoint)
          trainingMonitor.onStepComplete(currentPoint)
          super.onStepComplete(currentPoint)
        }
      })
      .setTimeout(trainingMinutes, TimeUnit.MINUTES)
      .setMaxIterations(trainingIterations)
      .setLineSearchFactory((_: CharSequence) => lineSearchInstance)
      .setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
      .runAndFree
      .asInstanceOf[lang.Double]

Logging:

    Reset training subject: 899560116651200
    Reset training subject: 899560285263700
    Adding measurement 7793ad58 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.0210413485765457;dx=-3.322470405180063E-8
    Armijo: th(2.154434690031884)=1.0210413485765457; dx=-3.3224704462630145E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=1.0210413485765457; dx=-3.322470457408289E-8 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=1.0210413485765457; dx=-3.322470420554582E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=1.0210413485765457; dx=-3.3224704114049016E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=1.0210413485765457; dx=-3.322470406428041E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002992270402822061)=1.0210413485765457; dx=-3.322470405358341E-8 evalInputDelta=0.0
    Armijo: th(0.010472946409877214)=1.0210413485765457; dx=-3.322470405956436E-8 evalInputDelta=0.0
    Armijo: th(0.006732608406349637)=1.0210413485765457; dx=-3.322470405641705E-8 evalInputDelta=0.0
    Armijo: th(0.004862439404585849)=1.0210413485765457; dx=-3.322470405498611E-8 evalInputDelta=0.0
    Armijo: th(0.003927354903703955)=1.0210413485765457; dx=-3.322470405445048E-8 evalInputDelta=0.0
    Armijo: th(0.0034598126532630075)=1.0210413485765457; dx=-3.322470405397827E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.003226041528042534)=1.0210413485765457; dx=-3.3224704053730416E-8 evalInputDelta=0.0
    Armijo: th(0.0033429270906527708)=1.0210413485765457; dx=-3.322470405377338E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0032844843093476524)=1.0210413485765457; dx=-3.322470405372881E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0033137057000002116)=1.0210413485765457; dx=-3.322470405372881E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.003328316395326491)=1.0210413485765457; dx=-3.322470405372881E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.003335621742989631)=1.0210413485765457; dx=-3.322470405377338E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.003339274416821201)=1.0210413485765457; dx=-3.322470405377338

...skipping 1686 bytes...

    6682943E-8 evalInputDelta=0.0
    Armijo: th(0.017997994469181447)=1.0210413485765457; dx=-3.322470406430651E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0161981950222633)=1.0210413485765457; dx=-3.3224704063072786E-8 evalInputDelta=0.0
    Armijo: th(0.017098094745722374)=1.0210413485765457; dx=-3.322470406343727E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.016648144883992837)=1.0210413485765457; dx=-3.322470406299192E-8 evalInputDelta=0.0
    Armijo: th(0.016873119814857604)=1.0210413485765457; dx=-3.322470406315384E-8 evalInputDelta=0.0
    Armijo: th(0.016760632349425222)=1.0210413485765457; dx=-3.322470406312716E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.01670438861670903)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    Armijo: th(0.016732510483067127)=1.0210413485765457; dx=-3.322470406312716E-8 evalInputDelta=0.0
    Armijo: th(0.01671844954988808)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    Armijo: th(0.016711419083298554)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    Armijo: th(0.016707903850003793)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.016706146233356412)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.016707025041680104)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.01670746444584195)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.01670768414792287)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.01670779399896333)=1.0210413485765457; dx=-3.322470406309751E-8 evalInputDelta=0.0
    mu ~= nu (0.01670779399896333): th(0.0)=1.0210413485765457
    Fitness changed from 1.0210413485765457 to 1.0210413485765457
    Static Iteration Total: 2.8378; Orientation: 0.0166; Line Search: 2.6682
    Iteration 2 failed. Error: 1.0210413485765457
    Previous Error: 0.0 -> 1.0210413485765457
    Optimization terminated 2
    Final threshold in iteration 2: 1.0210413485765457 (> -Infinity) after 6.731s (< 3600.000s)
    

Returns:

    1.0210413485765457