Code from BasicOptimizer.scala:75 executed in 45.41 seconds (1.800 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: 1590404197907
    Reset training subject: 1591086838349
    Adding measurement 1eea1dd1 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.101877951964853;dx=-1.3643607557486414E-8
    Armijo: th(2.154434690031884)=1.101877951964853; dx=-1.3643600558636752E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=1.101877951964853; dx=-1.3643606300360632E-8 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=1.101877951964853; dx=-1.3643609096381805E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=1.101877951964853; dx=-1.3643606320392755E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=1.101877951964853; dx=-1.3643606980183428E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002992270402822061)=1.101877951964853; dx=-1.3643607546934634E-8 evalInputDelta=0.0
    Armijo: th(0.010472946409877214)=1.101877951964853; dx=-1.3643606870030365E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.006732608406349637)=1.101877951964853; dx=-1.3643606881236951E-8 evalInputDelta=0.0
    Armijo: th(0.008602777408113426)=1.101877951964853; dx=-1.364360690806417E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0076676929072315315)=1.101877951964853; dx=-1.3643606894691297E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.008135235157672479)=1.101877951964853; dx=-1.3643606934779611E-8 evalInputDelta=0.0
    Armijo: th(0.008369006282892952)=1.101877951964853; dx=-1.3643606909418556E-8 evalInputDelta=0.0
    Armijo: th(0.008252120720282715)=1.101877951964853; dx=-1.3643606926463338E-8 evalInputDelta=0.0
    Armijo: th(0.008193677938977597)=1.101877951964853; dx=-1.3643606921852477E-8 evalInputDelta=0.0
    Armijo: th(0.008164456548325039)=1.101877951964853; dx=-1.3643606921852477E-8 evalInputDelta=0.0
    Armijo: th(0.008149845852998758)=1.101877951964853; dx=-1.3643606934779611E-8 evalInputDelta=0.0
    Armijo: th(0.008142540505335617)=1.101877951964853; dx=-1.3643606934779611E-8 evalInputDelta=0.0
    Armijo: th(0.008138887831504047)=1.101877951964853; dx=-1.3643606934779611E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0081370614

...skipping 1467 bytes...

    )=1.101877951964853; dx=-1.364360738866347E-8 evalInputDelta=0.0
    Armijo: th(0.04382830219842721)=1.101877951964853; dx=-1.3643606650994808E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.03944547197858449)=1.101877951964853; dx=-1.3643606629818723E-8 evalInputDelta=0.0
    Armijo: th(0.04163688708850585)=1.101877951964853; dx=-1.3643606650358691E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04054117953354517)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    Armijo: th(0.04108903331102551)=1.101877951964853; dx=-1.3643606649692687E-8 evalInputDelta=0.0
    Armijo: th(0.040815106422285335)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04067814297791525)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    Armijo: th(0.04074662470010029)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    Armijo: th(0.04071238383900777)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    Armijo: th(0.04069526340846151)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    Armijo: th(0.04068670319318838)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04068242308555181)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04068456313937009)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04068563316627924)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.040686168179733806)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.04068643568646109)=1.101877951964853; dx=-1.3643606655276698E-8 evalInputDelta=0.0
    mu ~= nu (0.04068643568646109): th(0.0)=1.101877951964853
    Fitness changed from 1.101877951964853 to 1.101877951964853
    Static Iteration Total: 21.4536; Orientation: 0.0693; Line Search: 20.0232
    Iteration 2 failed. Error: 1.101877951964853
    Previous Error: 0.0 -> 1.101877951964853
    Optimization terminated 2
    Final threshold in iteration 2: 1.101877951964853 (> -Infinity) after 45.407s (< 3600.000s)
    

Returns:

    1.101877951964853