Code from BasicOptimizer.scala:88 executed in 386.55 seconds (2.605 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    val trainer = new IterativeTrainer(trainable)
    trainer.setOrientation(orientation())
    trainer.setMonitor(new TrainingMonitor() {
      override def clear(): Unit = trainingMonitor.clear()
  
      override def log(msg: String): Unit = {
        trainingMonitor.log(msg)
        BasicOptimizer.this.log(msg)
      }
  
      override def onStepFail(currentPoint: Step): Boolean = {
        BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
        trainingMonitor.onStepComplete(currentPoint)
        super.onStepComplete(currentPoint)
      }
    })
    trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
    trainer.setMaxIterations(trainingIterations)
    trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
    trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
    val result = trainer.run.asInstanceOf[lang.Double]
    trainer.freeRef()
    result

Logging:

    Reset training subject: 7822516421300
    Reset training subject: 7829581389320
    Adding measurement 76bce372 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.5464085191488266;dx=-4.3013456150466856E-8
    Armijo: th(2.154434690031884)=1.5464085191488266; dx=-4.294896552923854E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=1.5464085191488266; dx=-4.295336321617118E-8 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=1.5464085191488266; dx=-4.295999780051002E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=1.5464085191488266; dx=-4.2956141374552635E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=1.5464085191488266; dx=-4.294111262608959E-8 evalInputDelta=0.0
    Armijo: th(0.002992270402822061)=1.5464085191488266; dx=-4.294445857696319E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.2746720040315154E-4)=1.5464085191488266; dx=-4.294957952792421E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0017098688016126062)=1.5464085191488266; dx=-4.293993206592908E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0023510696022173336)=1.5464085191488266; dx=-4.2951870066323194E-8 evalInputDelta=0.0
    Armijo: th(0.0026716700025196972)=1.5464085191488266; dx=-4.295361337830929E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025113698023685157)=1.5464085191488266; dx=-4.295158398391474E-8 evalInputDelta=0.0
    Armijo: th(0.0025915199024441064)=1.5464085191488266; dx=-4.2947476895886856E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025514448524063113)=1.5464085191488266; dx=-4.293340505338005E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002571482377425209)=1.5464085191488266; dx=-4.29458570924364E-8 evalInputDelta=0.0
    Armijo: th(0.0025815011399346575)=1.5464085191488266; dx=-4.2951932478881146E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025764917586799333)=1.5464085191488266; dx=-4.294457714963842E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025789964493072954)=1.5464085191488266; dx=-4.2944306999218314E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025802487946209765)=1.5464085191488266; dx=-4.294522557818116E-8 ev

...skipping 1546 bytes...

    5464085191488266; dx=-4.292810660985108E-8 evalInputDelta=0.0
    Armijo: th(0.013902028435742394)=1.5464085191488266; dx=-4.293098669194195E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.012511825592168156)=1.5464085191488266; dx=-4.2962243179745016E-8 evalInputDelta=0.0
    Armijo: th(0.013206927013955275)=1.5464085191488266; dx=-4.294125455884357E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.012859376303061715)=1.5464085191488266; dx=-4.2951497389160885E-8 evalInputDelta=0.0
    Armijo: th(0.013033151658508494)=1.5464085191488266; dx=-4.295364770387019E-8 evalInputDelta=0.0
    Armijo: th(0.012946263980785105)=1.5464085191488266; dx=-4.293008864692078E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.01290282014192341)=1.5464085191488266; dx=-4.29564890152048E-8 evalInputDelta=0.0
    Armijo: th(0.012924542061354257)=1.5464085191488266; dx=-4.29541594799166E-8 evalInputDelta=0.0
    Armijo: th(0.012913681101638833)=1.5464085191488266; dx=-4.295737854285644E-8 evalInputDelta=0.0
    Armijo: th(0.012908250621781121)=1.5464085191488266; dx=-4.2947123376672974E-8 evalInputDelta=0.0
    Armijo: th(0.012905535381852264)=1.5464085191488266; dx=-4.2955401547069975E-8 evalInputDelta=0.0
    Armijo: th(0.012904177761887837)=1.5464085191488266; dx=-4.2951102885208733E-8 evalInputDelta=0.0
    Armijo: th(0.012903498951905623)=1.5464085191488266; dx=-4.2951987263266534E-8 evalInputDelta=0.0
    Armijo: th(0.012903159546914516)=1.5464085191488266; dx=-4.2941670777992386E-8 evalInputDelta=0.0
    Armijo: th(0.012902989844418962)=1.5464085191488266; dx=-4.295318135464306E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.012902904993171186)=1.5464085191488266; dx=-4.29552808323986E-8 evalInputDelta=0.0
    mu ~= nu (0.012902904993171186): th(0.0)=1.5464085191488266
    Fitness changed from 1.5464085191488266 to 1.5464085191488266
    Static Iteration Total: 181.0039; Orientation: 0.0383; Line Search: 166.1198
    Iteration 2 failed. Error: 1.5464085191488266
    Previous Error: 0.0 -> 1.5464085191488266
    Optimization terminated 2
    Final threshold in iteration 2: 1.5464085191488266 (> -Infinity) after 386.549s (< 3600.000s)
    

Returns:

    1.5464085191488266