Code from BasicOptimizer.scala:88 executed in 394.60 seconds (3.050 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: 9865881232226
    Reset training subject: 9875472079331
    Adding measurement 652d0474 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.4919900298118591;dx=-4.266900927630735E-8
    Armijo: th(2.154434690031884)=1.4919900298118591; dx=-4.259192605587981E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=1.4919900596141815; dx=-4.25835251450717E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(0.3590724483386473)=1.4919900298118591; dx=-4.259029437686405E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=1.4919900298118591; dx=-4.2589124585470495E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=1.4919900298118591; dx=-4.258570757680861E-8 evalInputDelta=0.0
    Armijo: th(0.002992270402822061)=1.4919900298118591; dx=-4.258650238831793E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.2746720040315154E-4)=1.4919900298118591; dx=-4.258169990333444E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0017098688016126062)=1.4919900298118591; dx=-4.257424178472811E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0023510696022173336)=1.4919900298118591; dx=-4.2591255180324506E-8 evalInputDelta=0.0
    Armijo: th(0.0026716700025196972)=1.4919900298118591; dx=-4.2585111059171034E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025113698023685157)=1.4919900298118591; dx=-4.2581415473598474E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0025915199024441064)=1.4919900298118591; dx=-4.2589525743916464E-8 evalInputDelta=0.0
    Armijo: th(0.0026315949524819016)=1.4919900298118591; dx=-4.2588397785422254E-8 evalInputDelta=0.0
    Armijo: th(0.002611557427463004)=1.4919900298118591; dx=-4.2584112705837255E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0026015386649535554)=1.4919900298118591; dx=-4.258111430725086E-8 evalInputDelta=0.0
    Armijo: th(0.0026065480462082796)=1.4919900298118591; dx=-4.259091522981736E-8 evalInputDelta=0.0
    Armijo: th(0.0026040433555809175)=1.4919900298118591; dx=-4.259255109959218E-8 evalInputDelta=0.0
    Armijo: th(0.0026027910102672364)=1.4919900298118591; dx=-4.2583766783705036E-8

...skipping 1547 bytes...

    98118591; dx=-4.258641310702652E-8 evalInputDelta=0.0
    Armijo: th(0.014014273452925736)=1.4919900298118591; dx=-4.259844025855388E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.012612846107633163)=1.4919900298118591; dx=-4.259313090326732E-8 evalInputDelta=0.0
    Armijo: th(0.01331355978027945)=1.4919900298118591; dx=-4.258773206885526E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.012963202943956306)=1.4919900298118591; dx=-4.25935025872694E-8 evalInputDelta=0.0
    Armijo: th(0.013138381362117878)=1.4919900298118591; dx=-4.2585616644731686E-8 evalInputDelta=0.0
    Armijo: th(0.013050792153037092)=1.4919900298118591; dx=-4.25910330847641E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013006997548496699)=1.4919900298118591; dx=-4.258808056021512E-8 evalInputDelta=0.0
    Armijo: th(0.013028894850766895)=1.4919900298118591; dx=-4.2595940767186997E-8 evalInputDelta=0.0
    Armijo: th(0.013017946199631796)=1.4919900298118591; dx=-4.259887451063316E-8 evalInputDelta=0.0
    Armijo: th(0.013012471874064247)=1.4919900298118591; dx=-4.259874970637651E-8 evalInputDelta=0.0
    Armijo: th(0.013009734711280474)=1.4919900298118591; dx=-4.258232369965797E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013008366129888586)=1.4919900298118591; dx=-4.2595127485883856E-8 evalInputDelta=0.0
    Armijo: th(0.01300905042058453)=1.4919900298118591; dx=-4.258874781680953E-8 evalInputDelta=0.0
    Armijo: th(0.013008708275236558)=1.4919900298118591; dx=-4.258438834157044E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013008537202562571)=1.4919900298118591; dx=-4.258181791067374E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.013008622738899564)=1.4919900298118591; dx=-4.258513054127886E-8 evalInputDelta=0.0
    mu ~= nu (0.013008622738899564): th(0.0)=1.4919900298118591
    Fitness changed from 1.4919900298118591 to 1.4919900298118591
    Static Iteration Total: 179.7962; Orientation: 0.0383; Line Search: 165.6611
    Iteration 2 failed. Error: 1.4919900298118591
    Previous Error: 0.0 -> 1.4919900298118591
    Optimization terminated 2
    Final threshold in iteration 2: 1.4919900298118591 (> -Infinity) after 394.596s (< 3600.000s)
    

Returns:

    1.4919900298118591