Code from BasicOptimizer.scala:88 executed in 999.44 seconds (8.668 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    val trainer = new IterativeTrainer(trainable)
    trainer.setOrientation(orientation())
    trainer.setMonitor(new TrainingMonitor() {
      override def clear(): Unit = trainingMonitor.clear()
  
      override def log(msg: String): Unit = {
        trainingMonitor.log(msg)
        BasicOptimizer.this.log(msg)
      }
  
      override def onStepFail(currentPoint: Step): Boolean = {
        BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
        trainingMonitor.onStepComplete(currentPoint)
        super.onStepComplete(currentPoint)
      }
    })
    trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
    trainer.setMaxIterations(trainingIterations)
    trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
    trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
    val result = trainer.run.asInstanceOf[lang.Double]
    trainer.freeRef()
    result

Logging:

    Reset training subject: 5862239080377
    Reset training subject: 5878842979071
    Adding measurement 82beca4 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=4.545463755726814;dx=-8.582505112164633E-8
    Armijo: th(2.154434690031884)=4.545463860034943; dx=-8.581987823376344E-8 evalInputDelta=-1.043081283569336E-7
    Armijo: th(1.077217345015942)=4.545463874936104; dx=-8.58198734997567E-8 evalInputDelta=-1.1920928955078125E-7
    Armijo: th(0.3590724483386473)=4.545463755726814; dx=-8.582128571893627E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=4.545463755726814; dx=-8.582190729997436E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=4.545463755726814; dx=-8.582107716969776E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002992270402822061)=4.545463755726814; dx=-8.582340290555788E-8 evalInputDelta=0.0
    Armijo: th(0.010472946409877214)=4.545463755726814; dx=-8.582135394378658E-8 evalInputDelta=0.0
    Armijo: th(0.006732608406349637)=4.545463755726814; dx=-8.582044392260972E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.004862439404585849)=4.545463755726814; dx=-8.582249628675735E-8 evalInputDelta=0.0
    Armijo: th(0.005797523905467743)=4.545463755726814; dx=-8.582216166274236E-8 evalInputDelta=0.0
    Armijo: th(0.005329981655026796)=4.545463755726814; dx=-8.5818908706894E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.005096210529806322)=4.545463755726814; dx=-8.582163280150421E-8 evalInputDelta=0.0
    Armijo: th(0.005213096092416559)=4.545463755726814; dx=-8.582489458031862E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.005154653311111441)=4.545463755726814; dx=-8.582585089347442E-8 evalInputDelta=0.0
    Armijo: th(0.005183874701764)=4.545463755726814; dx=-8.582417763022182E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.00516926400643772)=4.545463755726814; dx=-8.582217106320316E-8 evalInputDelta=0.0
    Armijo: th(0.00517656935410086)=4.545463755726814; dx=-8.58192409048047E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.00517291668026929)=4.545463755726814; dx=-8.582046101859619E-8 evalInputDelta=0.0
    Armijo: th

...skipping 1557 bytes...

     th(0.03344344766238876)=4.545463755726814; dx=-8.582479158529724E-8 evalInputDelta=0.0
    Armijo: th(0.027869539718657303)=4.545463755726814; dx=-8.582482973660774E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.02508258574679157)=4.545463755726814; dx=-8.582361407294485E-8 evalInputDelta=0.0
    Armijo: th(0.02647606273272444)=4.545463755726814; dx=-8.582363591664929E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.025779324239758004)=4.545463755726814; dx=-8.582642424050812E-8 evalInputDelta=0.0
    Armijo: th(0.02612769348624122)=4.545463755726814; dx=-8.582282072535489E-8 evalInputDelta=0.0
    Armijo: th(0.025953508862999613)=4.545463755726814; dx=-8.581832345871234E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.025866416551378807)=4.545463755726814; dx=-8.582334044091388E-8 evalInputDelta=0.0
    Armijo: th(0.02590996270718921)=4.545463755726814; dx=-8.582268472104077E-8 evalInputDelta=0.0
    Armijo: th(0.02588818962928401)=4.545463755726814; dx=-8.582217817336419E-8 evalInputDelta=0.0
    Armijo: th(0.025877303090331406)=4.545463755726814; dx=-8.582538645359172E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.025871859820855107)=4.545463755726814; dx=-8.582196004367823E-8 evalInputDelta=0.0
    Armijo: th(0.025874581455593258)=4.545463755726814; dx=-8.582225712348626E-8 evalInputDelta=0.0
    Armijo: th(0.025873220638224184)=4.545463755726814; dx=-8.581923304748526E-8 evalInputDelta=0.0
    Armijo: th(0.025872540229539644)=4.545463755726814; dx=-8.58229586783701E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.025872200025197377)=4.545463755726814; dx=-8.582421435292898E-8 evalInputDelta=0.0
    Armijo: th(0.02587237012736851)=4.545463755726814; dx=-8.581980294784952E-8 evalInputDelta=0.0
    mu ~= nu (0.025872200025197377): th(0.0)=4.545463755726814
    Fitness changed from 4.545463755726814 to 4.545463755726814
    Static Iteration Total: 447.1868; Orientation: 0.0943; Line Search: 411.4845
    Iteration 2 failed. Error: 4.545463755726814
    Previous Error: 0.0 -> 4.545463755726814
    Optimization terminated 2
    Final threshold in iteration 2: 4.545463755726814 (> -Infinity) after 999.437s (< 3600.000s)
    

Returns:

    4.545463755726814