Code from BasicOptimizer.scala:88 executed in 1091.77 seconds (7.781 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: 3373944819136
    Reset training subject: 3395163366095
    Adding measurement 57a80d2c to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.401241064071655;dx=-1.7102153795703624E-7
    Armijo: th(2.154434690031884)=8.401241064071655; dx=-1.707751202244563E-7 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=8.401241093873978; dx=-1.707945209060445E-7 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(0.3590724483386473)=8.401241064071655; dx=-1.7077548610869077E-7 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=8.401241064071655; dx=-1.7078145165680925E-7 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=8.401241064071655; dx=-1.7077972265065828E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.002992270402822061)=8.401241064071655; dx=-1.707732233444616E-7 evalInputDelta=0.0
    Armijo: th(0.010472946409877214)=8.401241064071655; dx=-1.7078092916385287E-7 evalInputDelta=0.0
    Armijo: th(0.006732608406349637)=8.401241064071655; dx=-1.707739399979921E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.004862439404585849)=8.401241064071655; dx=-1.7077423879928285E-7 evalInputDelta=0.0
    Armijo: th(0.005797523905467743)=8.401241064071655; dx=-1.7077550933355873E-7 evalInputDelta=0.0
    Armijo: th(0.005329981655026796)=8.401241064071655; dx=-1.7078044493522924E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.005096210529806322)=8.401241064071655; dx=-1.7078186680858235E-7 evalInputDelta=0.0
    Armijo: th(0.005213096092416559)=8.401241064071655; dx=-1.7077179635703184E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.005154653311111441)=8.401241064071655; dx=-1.7078155372378615E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.005183874701764)=8.401241064071655; dx=-1.7077274742259178E-7 evalInputDelta=0.0
    Armijo: th(0.00519848539709028)=8.401241064071655; dx=-1.707718108925968E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0051911800494271396)=8.401241064071655; dx=-1.707827875003053E-7 evalInputDelta=0.0
    Armijo: th(0.00519483272325871)=8.401241064071655; dx=-1.7078265525009804E-7 evalInputDelta=0.0
    WOLFE (w

...skipping 1581 bytes...

    481499645)=8.401241064071655; dx=-1.7079890841664093E-7 evalInputDelta=0.0
    Armijo: th(0.027971904012497037)=8.401241064071655; dx=-1.7078156127644873E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.025174713611247332)=8.401241064071655; dx=-1.7078791893186285E-7 evalInputDelta=0.0
    Armijo: th(0.026573308811872184)=8.401241064071655; dx=-1.707922929165562E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.025874011211559758)=8.401241064071655; dx=-1.7076936446056504E-7 evalInputDelta=0.0
    Armijo: th(0.02622366001171597)=8.401241064071655; dx=-1.7079067297835809E-7 evalInputDelta=0.0
    Armijo: th(0.026048835611637865)=8.401241064071655; dx=-1.7078072930890317E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.02596142341159881)=8.401241064071655; dx=-1.7079082067619711E-7 evalInputDelta=0.0
    Armijo: th(0.02600512951161834)=8.401241064071655; dx=-1.707945510922664E-7 evalInputDelta=0.0
    Armijo: th(0.025983276461608577)=8.401241064071655; dx=-1.7078475033508218E-7 evalInputDelta=0.0
    Armijo: th(0.025972349936603696)=8.401241064071655; dx=-1.707884508883809E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.025966886674101256)=8.401241064071655; dx=-1.7079089772845075E-7 evalInputDelta=0.0
    Armijo: th(0.025969618305352476)=8.401241064071655; dx=-1.7079817452873582E-7 evalInputDelta=0.0
    Armijo: th(0.025968252489726867)=8.401241064071655; dx=-1.7078811410585254E-7 evalInputDelta=0.0
    Armijo: th(0.02596756958191406)=8.401241064071655; dx=-1.7079870371488705E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.02596722812800766)=8.401241064071655; dx=-1.7078481190054095E-7 evalInputDelta=0.0
    Armijo: th(0.02596739885496086)=8.401241064071655; dx=-1.707924730384397E-7 evalInputDelta=0.0
    mu ~= nu (0.02596722812800766): th(0.0)=8.401241064071655
    Fitness changed from 8.401241064071655 to 8.401241064071655
    Static Iteration Total: 497.9175; Orientation: 0.0782; Line Search: 457.7222
    Iteration 2 failed. Error: 8.401241064071655
    Previous Error: 0.0 -> 8.401241064071655
    Optimization terminated 2
    Final threshold in iteration 2: 8.401241064071655 (> -Infinity) after 1091.771s (< 3600.000s)
    

Returns:

    8.401241064071655