Code from BasicOptimizer.scala:75 executed in 39.38 seconds (2.759 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: 1062960171516
    Reset training subject: 1063512046596
    Adding measurement 285706b1 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.2793604981253721;dx=-1.1233335472358153E-8
    Armijo: th(2.154434690031884)=1.2793604981253721; dx=-1.1233335440811743E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=1.2793604981253721; dx=-1.123333572956871E-8 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=1.2793604981253721; dx=-1.1233335316534586E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=1.2793604981253721; dx=-1.1233335457744506E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=1.2793604981253721; dx=-1.123333546946645E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002992270402822061)=1.2793604981253721; dx=-1.1233335472180845E-8 evalInputDelta=0.0
    Armijo: th(0.010472946409877214)=1.2793604981253721; dx=-1.1233335471117149E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.006732608406349637)=1.2793604981253721; dx=-1.1233335472105807E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.008602777408113426)=1.2793604981253721; dx=-1.1233335472123305E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.00953786190899532)=1.2793604981253721; dx=-1.1233335471712385E-8 evalInputDelta=0.0
    Armijo: th(0.010005404159436267)=1.2793604981253721; dx=-1.1233335471126337E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.009771633034215793)=1.2793604981253721; dx=-1.1233335470996344E-8 evalInputDelta=0.0
    Armijo: th(0.00988851859682603)=1.2793604981253721; dx=-1.1233335470996344E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.009830075815520912)=1.2793604981253721; dx=-1.1233335470996344E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.00985929720617347)=1.2793604981253721; dx=-1.1233335470996344E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.009873907901499751)=1.2793604981253721; dx=-1.1233335470996344E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.009881213249162892)=1.2793604981253721; dx=-1.1233335470996344E-8 evalInputDelta=0.0
    Armijo: th(0.009884865922994462)=1.2793604981253721; dx=-1.1233335470996344E-8 eval

...skipping 1541 bytes...

    dx=-1.1233335461078854E-8 evalInputDelta=0.0
    Armijo: th(0.05323229161928374)=1.2793604981253721; dx=-1.1233335462765968E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.047909062457355364)=1.2793604981253721; dx=-1.1233335462421228E-8 evalInputDelta=0.0
    Armijo: th(0.05057067703831955)=1.2793604981253721; dx=-1.1233335462515981E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04923986974783746)=1.2793604981253721; dx=-1.1233335462495376E-8 evalInputDelta=0.0
    Armijo: th(0.0499052733930785)=1.2793604981253721; dx=-1.1233335462519932E-8 evalInputDelta=0.0
    Armijo: th(0.04957257157045798)=1.2793604981253721; dx=-1.1233335462439834E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04940622065914772)=1.2793604981253721; dx=-1.1233335462461948E-8 evalInputDelta=0.0
    Armijo: th(0.04948939611480285)=1.2793604981253721; dx=-1.1233335462530379E-8 evalInputDelta=0.0
    Armijo: th(0.04944780838697529)=1.2793604981253721; dx=-1.1233335462530379E-8 evalInputDelta=0.0
    Armijo: th(0.0494270145230615)=1.2793604981253721; dx=-1.1233335462530379E-8 evalInputDelta=0.0
    Armijo: th(0.04941661759110461)=1.2793604981253721; dx=-1.1233335462383263E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04941141912512617)=1.2793604981253721; dx=-1.1233335462461948E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04941401835811539)=1.2793604981253721; dx=-1.1233335462461948E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.049415317974610004)=1.2793604981253721; dx=-1.1233335462383263E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04941596778285731)=1.2793604981253721; dx=-1.1233335462383263E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04941629268698096)=1.2793604981253721; dx=-1.1233335462383263E-8 evalInputDelta=0.0
    mu ~= nu (0.04941629268698096): th(0.0)=1.2793604981253721
    Fitness changed from 1.2793604981253721 to 1.2793604981253721
    Static Iteration Total: 18.2522; Orientation: 0.0679; Line Search: 17.0908
    Iteration 2 failed. Error: 1.2793604981253721
    Previous Error: 0.0 -> 1.2793604981253721
    Optimization terminated 2
    Final threshold in iteration 2: 1.2793604981253721 (> -Infinity) after 39.380s (< 3600.000s)
    

Returns:

    1.2793604981253721