Code from BasicOptimizer.scala:75 executed in 41.46 seconds (1.350 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: 1237105660178
    Reset training subject: 1237716327605
    Adding measurement 3bc5c6ae to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.0963485524200636;dx=-2.455693568808811E-8
    Armijo: th(2.154434690031884)=1.0963485524200636; dx=-2.4556934785565564E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=1.0963485524200636; dx=-2.455692817423875E-8 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=1.0963485524200636; dx=-2.455692890867435E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=1.0963485524200636; dx=-2.455693601414362E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=1.0963485524200636; dx=-2.455693566996824E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.002992270402822061)=1.0963485524200636; dx=-2.455693567493899E-8 evalInputDelta=0.0
    Armijo: th(0.010472946409877214)=1.0963485524200636; dx=-2.4556935657379007E-8 evalInputDelta=0.0
    Armijo: th(0.006732608406349637)=1.0963485524200636; dx=-2.4556935653564582E-8 evalInputDelta=0.0
    Armijo: th(0.004862439404585849)=1.0963485524200636; dx=-2.455693565970518E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.003927354903703955)=1.0963485524200636; dx=-2.4556935672650177E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.004394897154144902)=1.0963485524200636; dx=-2.4556935668152213E-8 evalInputDelta=0.0
    Armijo: th(0.004628668279365375)=1.0963485524200636; dx=-2.4556935667932805E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.0045117827167551385)=1.0963485524200636; dx=-2.4556935667932805E-8 evalInputDelta=0.0
    Armijo: th(0.004570225498060257)=1.0963485524200636; dx=-2.4556935667932805E-8 evalInputDelta=0.0
    Armijo: th(0.004541004107407698)=1.0963485524200636; dx=-2.4556935667932805E-8 evalInputDelta=0.0
    Armijo: th(0.004526393412081418)=1.0963485524200636; dx=-2.4556935667932805E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.004519088064418278)=1.0963485524200636; dx=-2.4556935667932805E-8 evalInputDelta=0.0
    Armijo: th(0.0045227407382498475)=1.0963485524200636; dx=-2.4556935667932805E-8 evalInputDelta=0.0
    WOLFE (we

...skipping 1628 bytes...

     dx=-2.455693606734008E-8 evalInputDelta=0.0
    Armijo: th(0.02435057499274023)=1.0963485524200636; dx=-2.4556935669272067E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.021915517493466208)=1.0963485524200636; dx=-2.4556935652035843E-8 evalInputDelta=0.0
    Armijo: th(0.02313304624310322)=1.0963485524200636; dx=-2.4556935663170436E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.022524281868284715)=1.0963485524200636; dx=-2.4556935664442825E-8 evalInputDelta=0.0
    Armijo: th(0.02282866405569397)=1.0963485524200636; dx=-2.4556935664282097E-8 evalInputDelta=0.0
    Armijo: th(0.022676472961989342)=1.0963485524200636; dx=-2.4556935662532573E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.022600377415137027)=1.0963485524200636; dx=-2.455693566368713E-8 evalInputDelta=0.0
    Armijo: th(0.022638425188563183)=1.0963485524200636; dx=-2.455693566392406E-8 evalInputDelta=0.0
    Armijo: th(0.022619401301850105)=1.0963485524200636; dx=-2.455693566392406E-8 evalInputDelta=0.0
    Armijo: th(0.022609889358493566)=1.0963485524200636; dx=-2.455693566368713E-8 evalInputDelta=0.0
    Armijo: th(0.022605133386815295)=1.0963485524200636; dx=-2.455693566368713E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.02260275540097616)=1.0963485524200636; dx=-2.455693566368713E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.02260394439389573)=1.0963485524200636; dx=-2.455693566368713E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.022604538890355512)=1.0963485524200636; dx=-2.455693566368713E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.022604836138585403)=1.0963485524200636; dx=-2.455693566368713E-8 evalInputDelta=0.0
    WOLFE (weak): th(0.02260498476270035)=1.0963485524200636; dx=-2.455693566368713E-8 evalInputDelta=0.0
    mu ~= nu (0.02260498476270035): th(0.0)=1.0963485524200636
    Fitness changed from 1.0963485524200636 to 1.0963485524200636
    Static Iteration Total: 18.1754; Orientation: 0.0668; Line Search: 16.9114
    Iteration 2 failed. Error: 1.0963485524200636
    Previous Error: 0.0 -> 1.0963485524200636
    Optimization terminated 2
    Final threshold in iteration 2: 1.0963485524200636 (> -Infinity) after 41.456s (< 3600.000s)
    

Returns:

    1.0963485524200636