Code from BasicOptimizer.scala:75 executed in 37.65 seconds (3.426 gc):

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

Logging:

    Reset training subject: 1019786156924
    Reset training subject: 1020304780358
    Adding measurement 10ef3ccf to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.9171986708779798;dx=-5.573743555080293E-9
    Armijo: th(2.154434690031884)=0.9171986708779798; dx=-5.573742151074105E-9 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=0.9171986708779798; dx=-5.573742196756276E-9 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=0.9171986708779798; dx=-5.573742226671482E-9 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=0.9171986708779798; dx=-5.57374355159303E-9 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=0.9171986708779798; dx=-5.573743554699676E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.002992270402822061)=0.9171986708779798; dx=-5.573743554924312E-9 evalInputDelta=0.0
    Armijo: th(0.010472946409877214)=0.9171986708779798; dx=-5.57374355502692E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.006732608406349637)=0.9171986708779798; dx=-5.573743555027853E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.008602777408113426)=0.9171986708779798; dx=-5.5737435549130675E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.00953786190899532)=0.9171986708779798; dx=-5.573743554999982E-9 evalInputDelta=0.0
    Armijo: th(0.010005404159436267)=0.9171986708779798; dx=-5.5737435550297546E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.009771633034215793)=0.9171986708779798; dx=-5.5737435550537486E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.00988851859682603)=0.9171986708779798; dx=-5.573743555040722E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.009946961378131149)=0.9171986708779798; dx=-5.573743555040722E-9 evalInputDelta=0.0
    Armijo: th(0.009976182768783707)=0.9171986708779798; dx=-5.5737435550297546E-9 evalInputDelta=0.0
    Armijo: th(0.009961572073457428)=0.9171986708779798; dx=-5.5737435550297546E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.009954266725794289)=0.9171986708779798; dx=-5.5737435550297546E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.00995791939962586)=0.9171986708779798; dx=-5.5737435550297546E-9 evalInputDelta=0

...skipping 1520 bytes...

    171986708779798; dx=-5.573743552715254E-9 evalInputDelta=0.0
    Armijo: th(0.05364205619492446)=0.9171986708779798; dx=-5.573743553458397E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.04827785057543202)=0.9171986708779798; dx=-5.573743553614351E-9 evalInputDelta=0.0
    Armijo: th(0.05095995338517824)=0.9171986708779798; dx=-5.573743553429205E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.04961890198030513)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    Armijo: th(0.05028942768274168)=0.9171986708779798; dx=-5.5737435535053335E-9 evalInputDelta=0.0
    Armijo: th(0.0499541648315234)=0.9171986708779798; dx=-5.57374355357629E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.04978653340591427)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    Armijo: th(0.049870349118718835)=0.9171986708779798; dx=-5.5737435536184835E-9 evalInputDelta=0.0
    Armijo: th(0.04982844126231655)=0.9171986708779798; dx=-5.5737435536184835E-9 evalInputDelta=0.0
    Armijo: th(0.04980748733411541)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    Armijo: th(0.04979701037001484)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.049791771887964555)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.0497943911289897)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.04979570074950227)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.04979635555975856)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    WOLFE (weak): th(0.0497966829648867)=0.9171986708779798; dx=-5.573743553645273E-9 evalInputDelta=0.0
    mu ~= nu (0.0497966829648867): th(0.0)=0.9171986708779798
    Fitness changed from 0.9171986708779798 to 0.9171986708779798
    Static Iteration Total: 17.0925; Orientation: 0.0666; Line Search: 16.0026
    Iteration 2 failed. Error: 0.9171986708779798
    Previous Error: 0.0 -> 0.9171986708779798
    Optimization terminated 2
    Final threshold in iteration 2: 0.9171986708779798 (> -Infinity) after 37.647s (< 3600.000s)
    

Returns:

    0.9171986708779798