Code from BasicOptimizer.scala:75 executed in 47.68 seconds (0.905 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: 1749441081733
    Reset training subject: 1750189262037
    Adding measurement e036a80 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.0387125207676546;dx=-1.0870643186342167E-8
    Armijo: th(2.154434690031884)=1.0387125207676546; dx=-1.0870630090371614E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=1.0387125207676546; dx=-1.0870640613174591E-8 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=1.0387125207676546; dx=-1.0870646402800349E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=1.0387125207676546; dx=-1.0870643367502127E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=1.0387125207676546; dx=-1.0870643310561214E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002992270402822061)=1.0387125207676546; dx=-1.0870643149247098E-8 evalInputDelta=0.0
    Armijo: th(0.010472946409877214)=1.0387125207676546; dx=-1.0870643346471896E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.006732608406349637)=1.0387125207676546; dx=-1.0870643407846284E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.008602777408113426)=1.0387125207676546; dx=-1.0870643402381743E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.00953786190899532)=1.0387125207676546; dx=-1.0870643408177023E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.010005404159436267)=1.0387125207676546; dx=-1.087064337368628E-8 evalInputDelta=0.0
    Armijo: th(0.01023917528465674)=1.0387125207676546; dx=-1.0870643396264102E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.010122289722046504)=1.0387125207676546; dx=-1.0870643396264102E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.010180732503351622)=1.0387125207676546; dx=-1.0870643396264102E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.01020995389400418)=1.0387125207676546; dx=-1.0870643396264102E-8 evalInputDelta=0.0
    Armijo: th(0.010224564589330461)=1.0387125207676546; dx=-1.0870643396264102E-8 evalInputDelta=0.0
    Armijo: th(0.010217259241667321)=1.0387125207676546; dx=-1.0870643396264102E-8 evalInputDelta=0.0
    Armijo: th(0.01021360656783575)=1.0387125207676546; dx=-1.0870643396264102E-8 evalInputDe

...skipping 1558 bytes...

    .0870632706676218E-8 evalInputDelta=0.0
    Armijo: th(0.05500845044752996)=1.0387125207676546; dx=-1.0870632464849113E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04950760540277696)=1.0387125207676546; dx=-1.0870632500854897E-8 evalInputDelta=0.0
    Armijo: th(0.05225802792515346)=1.0387125207676546; dx=-1.0870632461023457E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.050882816663965214)=1.0387125207676546; dx=-1.0870632495903096E-8 evalInputDelta=0.0
    Armijo: th(0.05157042229455934)=1.0387125207676546; dx=-1.0870632349442578E-8 evalInputDelta=0.0
    Armijo: th(0.05122661947926228)=1.0387125207676546; dx=-1.087063235642353E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.05105471807161374)=1.0387125207676546; dx=-1.0870632376448096E-8 evalInputDelta=0.0
    Armijo: th(0.051140668775438006)=1.0387125207676546; dx=-1.0870632369091237E-8 evalInputDelta=0.0
    Armijo: th(0.051097693423525874)=1.0387125207676546; dx=-1.0870632369091237E-8 evalInputDelta=0.0
    Armijo: th(0.05107620574756981)=1.0387125207676546; dx=-1.0870632369091237E-8 evalInputDelta=0.0
    Armijo: th(0.051065461909591776)=1.0387125207676546; dx=-1.0870632376448096E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.051060089990602756)=1.0387125207676546; dx=-1.0870632376448096E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.05106277595009727)=1.0387125207676546; dx=-1.0870632376448096E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.051064118929844526)=1.0387125207676546; dx=-1.0870632376448096E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.05106479041971815)=1.0387125207676546; dx=-1.0870632376448096E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.05106512616465496)=1.0387125207676546; dx=-1.0870632376448096E-8 evalInputDelta=0.0
    mu ~= nu (0.05106512616465496): th(0.0)=1.0387125207676546
    Fitness changed from 1.0387125207676546 to 1.0387125207676546
    Static Iteration Total: 21.6580; Orientation: 0.0667; Line Search: 20.1047
    Iteration 2 failed. Error: 1.0387125207676546
    Previous Error: 0.0 -> 1.0387125207676546
    Optimization terminated 2
    Final threshold in iteration 2: 1.0387125207676546 (> -Infinity) after 47.682s (< 3600.000s)
    

Returns:

    1.0387125207676546