Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:75 executed in 532.21 seconds (5.365 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: 748019824680700
    Reset training subject: 748024555415600
    Adding measurement 8a6631b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=9.739349827170372;dx=-2.9372430514154176E-6
    New Minimum: 9.739349827170372 > 9.739340469241142
    WOLFE (weak): th(2.154434690031884)=9.739340469241142; dx=-2.9352098042028935E-6 evalInputDelta=9.357929229736328E-6
    New Minimum: 9.739340469241142 > 9.739330723881721
    WOLFE (weak): th(4.308869380063768)=9.739330723881721; dx=-2.9345841878404623E-6 evalInputDelta=1.9103288650512695E-5
    New Minimum: 9.739330723881721 > 9.73929287493229
    WOLFE (weak): th(12.926608140191302)=9.73929287493229; dx=-2.9350493322861774E-6 evalInputDelta=5.695223808288574E-5
    New Minimum: 9.73929287493229 > 9.739122658967972
    WOLFE (weak): th(51.70643256076521)=9.739122658967972; dx=-2.933507237804444E-6 evalInputDelta=2.2716820240020752E-4
    New Minimum: 9.739122658967972 > 9.738214202225208
    WOLFE (weak): th(258.53216280382605)=9.738214202225208; dx=-2.9353206915994667E-6 evalInputDelta=0.0011356249451637268
    New Minimum: 9.738214202225208 > 9.732543237507343
    WOLFE (weak): th(1551.1929768229563)=9.732543237507343; dx=-2.9231026968293863E-6 evalInputDelta=0.006806589663028717
    New Minimum: 9.732543237507343 > 9.692205056548119
    WOLFE (weak): th(10858.350837760694)=9.692205056548119; dx=-2.85827175578822E-6 evalInputDelta=0.04714477062225342
    New Minimum: 9.692205056548119 > 9.378110438585281
    END: th(86866.80670208555)=9.378110438585281; dx=-2.353516650160879E-6 evalInputDelta=0.36123938858509064
    Fitness changed from 9.739349827170372 to 9.378110438585281
    Iteration 1 complete. Error: 9.378110438585281 Total: 51.4905; Orientation: 0.0175; Line Search: 38.5103
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/82981816-14f5-4835-a523-87369439639a.jpg)
    
    Adding measurement 7186b202 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=9.378110438585281;dx=-3.915965505157306E-6
    New Minimum: 9.37811

...skipping 25016 bytes...

    t 3002e397 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.785e+02, gradient 2.740e-04, dot -0.791; [f4fc3e74-f4f1-4f91-a066-a0365113bd21 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.027460627257824, 2.9753590375185013, 2.945012152194977, 2.909731946885586
    LBFGS Accumulation History: 3 points
    Removed measurement 5b02a984 to history. Total: 4
    th(0)=2.909731946885586;dx=-7.485545070997294E-8
    New Minimum: 2.909731946885586 > 2.881220906972885
    END: th(550861.3049874114)=2.881220906972885; dx=-1.1086258345433213E-8 evalInputDelta=0.028511039912700653
    Fitness changed from 2.909731946885586 to 2.881220906972885
    Iteration 29 complete. Error: 2.881220906972885 Total: 12.4914; Orientation: 0.1349; Line Search: 8.3740
    Adding measurement 21b51e59 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.271e+02, gradient 3.395e-04, dot -0.609; [f4fc3e74-f4f1-4f91-a066-a0365113bd21 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.9753590375185013, 2.945012152194977, 2.909731946885586, 2.881220906972885
    LBFGS Accumulation History: 3 points
    Removed measurement 2e6d76ba to history. Total: 4
    th(0)=2.881220906972885;dx=-1.1495030434370393E-7
    Armijo: th(1186794.7048611126)=2.8889691084623337; dx=4.335093046009215E-8 evalInputDelta=-0.007748201489448547
    New Minimum: 2.881220906972885 > 2.857556588947773
    WOLF (strong): th(593397.3524305563)=2.857556588947773; dx=3.621473428145589E-8 evalInputDelta=0.023664318025112152
    New Minimum: 2.857556588947773 > 2.8565725684165955
    END: th(197799.11747685212)=2.8565725684165955; dx=-5.265929731987096E-8 evalInputDelta=0.024648338556289673
    Fitness changed from 2.881220906972885 to 2.8565725684165955
    Iteration 30 complete. Error: 2.8565725684165955 Total: 20.8018; Orientation: 0.1318; Line Search: 16.4973
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/4d369c10-5211-4a04-b3a2-bfd9d4e934cd.jpg)
    
    Final threshold in iteration 31: 2.8565725684165955 (> -Infinity) after 532.198s (< 3600.000s)
    

Returns:

    2.8565725684165955