Code from BasicOptimizer.scala:75 executed in 39.20 seconds (1.743 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: 911420885754400
    Reset training subject: 911421558445400
    Adding measurement 19672cb8 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.47569960355758667;dx=-5.93831346757177E-8
    Armijo: th(2.154434690031884)=0.47569960355758667; dx=-5.932045699834651E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=0.47569960355758667; dx=-5.932045811938317E-8 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=0.47569960355758667; dx=-5.932045876346398E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.002992270402822061)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.2746720040315154E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.0017098688016126062)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.001068668001007879)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(7.480676007055152E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(5.877674005543334E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(5.076173004787425E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(4.67542250440947E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.475047254220493E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.5752348793149815E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.6253286918622254E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.6503755981358477E-4)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.662899051272659E-4)=0.47569960355758667; dx=-5.932045

...skipping 1975 bytes...

    0.0025174524120930766)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0022657071708837686)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.0023915797914884226)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0023286434811860953)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.0023601116363372587)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.002344377558761677)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002336510519973886)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.0023404440393677813)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.0023384772796708336)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.00233749389982236)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    Armijo: th(0.0023370022098981227)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0023367563649360043)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0023368792874170633)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002336940748657593)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002336971479277858)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0023369868445879904)=0.47569960355758667; dx=-5.932045881116958E-8 evalInputDelta=0.0
    mu ~= nu (0.0023369868445879904): th(0.0)=0.47569960355758667
    Fitness changed from 0.47569960355758667 to 0.47569960355758667
    Static Iteration Total: 17.0001; Orientation: 0.0073; Line Search: 15.7252
    Iteration 2 failed. Error: 0.47569960355758667
    Previous Error: 0.0 -> 0.47569960355758667
    Optimization terminated 2
    Final threshold in iteration 2: 0.47569960355758667 (> -Infinity) after 39.204s (< 720.000s)
    

Returns:

    0.47569960355758667