Code from BasicOptimizer.scala:75 executed in 40.20 seconds (2.079 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: 973644510365
    Reset training subject: 974249515510
    Adding measurement 54c5464e to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.7473544619977961;dx=-4.990483504630966E-10
    Armijo: th(2.154434690031884)=0.7473544619977961; dx=-4.990483484661025E-10 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=0.7473544619977961; dx=-4.990483494950795E-10 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=0.7473544619977961; dx=-4.990483501188796E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.08976811208466183)=0.7473544619977961; dx=-4.990483503806014E-10 evalInputDelta=0.0
    Armijo: th(0.22442028021165458)=0.7473544619977961; dx=-4.990483502552196E-10 evalInputDelta=0.0
    Armijo: th(0.1570941961481582)=0.7473544619977961; dx=-4.990483503233745E-10 evalInputDelta=0.0
    Armijo: th(0.12343115411641001)=0.7473544619977961; dx=-4.990483503481639E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.10659963310053591)=0.7473544619977961; dx=-4.990483503663058E-10 evalInputDelta=0.0
    Armijo: th(0.11501539360847296)=0.7473544619977961; dx=-4.990483503543036E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.11080751335450444)=0.7473544619977961; dx=-4.990483503635835E-10 evalInputDelta=0.0
    Armijo: th(0.1129114534814887)=0.7473544619977961; dx=-4.990483503588412E-10 evalInputDelta=0.0
    Armijo: th(0.11185948341799656)=0.7473544619977961; dx=-4.990483503596174E-10 evalInputDelta=0.0
    Armijo: th(0.1113334983862505)=0.7473544619977961; dx=-4.990483503620544E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.11107050587037748)=0.7473544619977961; dx=-4.99048350363233E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.11120200212831399)=0.7473544619977961; dx=-4.990483503620544E-10 evalInputDelta=0.0
    Armijo: th(0.11126775025728225)=0.7473544619977961; dx=-4.990483503620544E-10 evalInputDelta=0.0
    Armijo: th(0.11123487619279812)=0.7473544619977961; dx=-4.990483503620544E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.11121843916055606)=0.7473544619977961; dx=-4.990483503620544E-10 evalInputDelta=0.0
    WOLFE (weak): th(0

...skipping 1294 bytes...

    7473544619977961; dx=-4.990483498095454E-10 evalInputDelta=0.0
    Armijo: th(0.5991179234253787)=0.7473544619977961; dx=-4.990483499138648E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.5392061310828409)=0.7473544619977961; dx=-4.990483499702286E-10 evalInputDelta=0.0
    Armijo: th(0.5691620272541098)=0.7473544619977961; dx=-4.990483499421354E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.5541840791684753)=0.7473544619977961; dx=-4.990483499634569E-10 evalInputDelta=0.0
    Armijo: th(0.5616730532112926)=0.7473544619977961; dx=-4.990483499484845E-10 evalInputDelta=0.0
    Armijo: th(0.557928566189884)=0.7473544619977961; dx=-4.990483499583846E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.5560563226791797)=0.7473544619977961; dx=-4.990483499618188E-10 evalInputDelta=0.0
    Armijo: th(0.5569924444345318)=0.7473544619977961; dx=-4.990483499615149E-10 evalInputDelta=0.0
    Armijo: th(0.5565243835568557)=0.7473544619977961; dx=-4.990483499615723E-10 evalInputDelta=0.0
    Armijo: th(0.5562903531180177)=0.7473544619977961; dx=-4.990483499618188E-10 evalInputDelta=0.0
    Armijo: th(0.5561733378985987)=0.7473544619977961; dx=-4.990483499618188E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.5561148302888892)=0.7473544619977961; dx=-4.990483499618188E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.5561440840937439)=0.7473544619977961; dx=-4.990483499618188E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.5561587109961713)=0.7473544619977961; dx=-4.990483499618188E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.5561660244473849)=0.7473544619977961; dx=-4.990483499618188E-10 evalInputDelta=0.0
    WOLFE (weak): th(0.5561696811729918)=0.7473544619977961; dx=-4.990483499618188E-10 evalInputDelta=0.0
    mu ~= nu (0.5561696811729918): th(0.0)=0.7473544619977961
    Fitness changed from 0.7473544619977961 to 0.7473544619977961
    Static Iteration Total: 19.6218; Orientation: 0.0695; Line Search: 18.3557
    Iteration 2 failed. Error: 0.7473544619977961
    Previous Error: 0.0 -> 0.7473544619977961
    Optimization terminated 2
    Final threshold in iteration 2: 0.7473544619977961 (> -Infinity) after 40.200s (< 3600.000s)
    

Returns:

    0.7473544619977961