Code from BasicOptimizer.scala:88 executed in 398.42 seconds (3.314 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: 6807044388555
    Reset training subject: 6814225615432
    Adding measurement 147d522c to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.517348513007164;dx=-4.261542232127963E-8
    Armijo: th(2.154434690031884)=1.5173486322164536; dx=-4.2542707264430625E-8 evalInputDelta=-1.1920928955078125E-7
    Armijo: th(1.077217345015942)=1.517348513007164; dx=-4.25323784119337E-8 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=1.517348513007164; dx=-4.254257521380259E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=1.517348513007164; dx=-4.252467295053721E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=1.517348513007164; dx=-4.253747861916665E-8 evalInputDelta=0.0
    Armijo: th(0.002992270402822061)=1.517348513007164; dx=-4.2542613819865184E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.2746720040315154E-4)=1.517348513007164; dx=-4.253082240200213E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0017098688016126062)=1.517348513007164; dx=-4.251728861192595E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0023510696022173336)=1.517348513007164; dx=-4.25330026522728E-8 evalInputDelta=0.0
    Armijo: th(0.0026716700025196972)=1.517348513007164; dx=-4.250855590624844E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025113698023685157)=1.517348513007164; dx=-4.253434797927049E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025915199024441064)=1.517348513007164; dx=-4.2538995203343034E-8 evalInputDelta=0.0
    Armijo: th(0.0026315949524819016)=1.517348513007164; dx=-4.253765836751052E-8 evalInputDelta=0.0
    Armijo: th(0.002611557427463004)=1.517348513007164; dx=-4.25300349690283E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0026015386649535554)=1.517348513007164; dx=-4.2543955853783286E-8 evalInputDelta=0.0
    Armijo: th(0.0026065480462082796)=1.517348513007164; dx=-4.2532550258982954E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0026040433555809175)=1.517348513007164; dx=-4.25421039198037E-8 evalInputDelta=0.0
    Armijo: th(0.0026052957008945985)=1.517348513007164; dx=-4.2513486109739135E-8 evalInputDelta=0

...skipping 1518 bytes...

    .517348513007164; dx=-4.255850168401389E-8 evalInputDelta=0.0
    Armijo: th(0.014031874314775143)=1.517348513007164; dx=-4.2548664574387644E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.01262868688329763)=1.517348513007164; dx=-4.254595812646273E-8 evalInputDelta=0.0
    Armijo: th(0.013330280599036386)=1.517348513007164; dx=-4.254442668558771E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.012979483741167008)=1.517348513007164; dx=-4.2553990968605E-8 evalInputDelta=0.0
    Armijo: th(0.013154882170101696)=1.517348513007164; dx=-4.254900704425897E-8 evalInputDelta=0.0
    Armijo: th(0.013067182955634353)=1.517348513007164; dx=-4.255810269654466E-8 evalInputDelta=0.0
    Armijo: th(0.013023333348400681)=1.517348513007164; dx=-4.254948939791888E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013001408544783846)=1.517348513007164; dx=-4.254872356893711E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013012370946592263)=1.517348513007164; dx=-4.254927579560227E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013017852147496473)=1.517348513007164; dx=-4.255440809466253E-8 evalInputDelta=0.0
    Armijo: th(0.013020592747948577)=1.517348513007164; dx=-4.2554958298012336E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013019222447722526)=1.517348513007164; dx=-4.254629923034352E-8 evalInputDelta=0.0
    Armijo: th(0.013019907597835553)=1.517348513007164; dx=-4.2547587347285966E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.01301956502277904)=1.517348513007164; dx=-4.2545326578664785E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013019736310307296)=1.517348513007164; dx=-4.2555689907418936E-8 evalInputDelta=0.0
    Armijo: th(0.013019821954071423)=1.517348513007164; dx=-4.255492915764982E-8 evalInputDelta=0.0
    mu ~= nu (0.013019736310307296): th(0.0)=1.517348513007164
    Fitness changed from 1.517348513007164 to 1.517348513007164
    Static Iteration Total: 181.5476; Orientation: 0.0394; Line Search: 167.9343
    Iteration 2 failed. Error: 1.517348513007164
    Previous Error: 0.0 -> 1.517348513007164
    Optimization terminated 2
    Final threshold in iteration 2: 1.517348513007164 (> -Infinity) after 398.423s (< 3600.000s)
    

Returns:

    1.517348513007164