Code from BasicOptimizer.scala:88 executed in 467.04 seconds (4.977 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: 8773163836366
    Reset training subject: 8780974279879
    Adding measurement 640e789e to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=-0.18718606233596802;dx=-2.1703702768362858E-8
    Armijo: th(2.154434690031884)=-0.18718606233596802; dx=-2.1701498571748583E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=-0.18718600273132324; dx=-2.1696035951256473E-8 evalInputDelta=-5.9604644775390625E-8
    Armijo: th(0.3590724483386473)=-0.18718603253364563; dx=-2.1693310054085536E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(0.08976811208466183)=-0.18718606233596802; dx=-2.1701125319184355E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=-0.18718606233596802; dx=-2.1697026991353085E-8 evalInputDelta=0.0
    Armijo: th(0.002992270402822061)=-0.18718606233596802; dx=-2.170821604314184E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.2746720040315154E-4)=-0.18718606233596802; dx=-2.169308625858324E-8 evalInputDelta=0.0
    Armijo: th(0.0017098688016126062)=-0.18718606233596802; dx=-2.1703400640039917E-8 evalInputDelta=0.0
    Armijo: th(0.001068668001007879)=-0.18718606233596802; dx=-2.170071839908209E-8 evalInputDelta=0.0
    Armijo: th(7.480676007055152E-4)=-0.18718606233596802; dx=-2.1689605508591928E-8 evalInputDelta=0.0
    WOLFE (weak): th(5.877674005543334E-4)=-0.18718606233596802; dx=-2.1699986734698622E-8 evalInputDelta=0.0
    Armijo: th(6.679175006299243E-4)=-0.18718606233596802; dx=-2.1699612528319468E-8 evalInputDelta=0.0
    WOLFE (weak): th(6.278424505921289E-4)=-0.18718606233596802; dx=-2.169932172115378E-8 evalInputDelta=0.0
    Armijo: th(6.478799756110266E-4)=-0.18718606233596802; dx=-2.1696751417236637E-8 evalInputDelta=0.0
    WOLFE (weak): th(6.378612131015778E-4)=-0.18718606233596802; dx=-2.170180917128857E-8 evalInputDelta=0.0
    Armijo: th(6.428705943563023E-4)=-0.18718606233596802; dx=-2.1703640041671637E-8 evalInputDelta=0.0
    Armijo: th(6.4036590372894E-4)=-0.18718606233596802; dx=-2.1682337880932887E-8 evalInputDelta=0.0
    WOLFE (weak): th(6.391135584152589E-4)=

...skipping 1904 bytes...

    (0.0034439678400228152)=-0.18718606233596802; dx=-2.1702542574878226E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0030995710560205334)=-0.18718606233596802; dx=-2.1701407821109214E-8 evalInputDelta=0.0
    Armijo: th(0.0032717694480216743)=-0.18718606233596802; dx=-2.1696209706694075E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.003185670252021104)=-0.18718606233596802; dx=-2.1703143734090284E-8 evalInputDelta=0.0
    Armijo: th(0.003228719850021389)=-0.18718606233596802; dx=-2.16929508821408E-8 evalInputDelta=0.0
    Armijo: th(0.0032071950510212466)=-0.18718606233596802; dx=-2.1674469151362333E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0031964326515211755)=-0.18718606233596802; dx=-2.1693845094312734E-8 evalInputDelta=0.0
    Armijo: th(0.003201813851271211)=-0.18718606233596802; dx=-2.169715466678124E-8 evalInputDelta=0.0
    Armijo: th(0.0031991232513961933)=-0.18718606233596802; dx=-2.1652403149263604E-8 evalInputDelta=0.0
    Armijo: th(0.003197777951458684)=-0.18718606233596802; dx=-2.170246200413858E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.00319710530148993)=-0.18718606233596802; dx=-2.1687592351555934E-8 evalInputDelta=0.0
    Armijo: th(0.003197441626474307)=-0.18718606233596802; dx=-2.1704919247999513E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0031972734639821184)=-0.18718606233596802; dx=-2.1701184833201206E-8 evalInputDelta=0.0
    Armijo: th(0.003197357545228213)=-0.18718606233596802; dx=-2.1704280821177783E-8 evalInputDelta=0.0
    Armijo: th(0.003197315504605166)=-0.18718606233596802; dx=-2.1700132814863772E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0031972944842936423)=-0.18718606233596802; dx=-2.170073089014833E-8 evalInputDelta=0.0
    mu ~= nu (0.0031972944842936423): th(0.0)=-0.18718606233596802
    Fitness changed from -0.18718606233596802 to -0.18718606233596802
    Static Iteration Total: 208.4922; Orientation: 0.0354; Line Search: 191.4347
    Iteration 2 failed. Error: -0.18718606233596802
    Previous Error: 0.0 -> -0.18718606233596802
    Optimization terminated 2
    Final threshold in iteration 2: -0.18718606233596802 (> -Infinity) after 467.036s (< 3600.000s)
    

Returns:

    -0.18718606233596802