Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Code from BasicOptimizer.scala:75 executed in 234.19 seconds (1.726 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: 922491219105000
    Reset training subject: 922498826215500
    Adding measurement 4839730e to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.7467390447854996;dx=-1.2002548527478416E-7
    New Minimum: 0.7467390447854996 > 0.7467389106750488
    WOLFE (weak): th(2.154434690031884)=0.7467389106750488; dx=-1.1987702608196457E-7 evalInputDelta=1.341104507446289E-7
    New Minimum: 0.7467389106750488 > 0.7467387765645981
    WOLFE (weak): th(4.308869380063768)=0.7467387765645981; dx=-1.1987706906374902E-7 evalInputDelta=2.682209014892578E-7
    New Minimum: 0.7467387765645981 > 0.7467377185821533
    WOLFE (weak): th(12.926608140191302)=0.7467377185821533; dx=-1.19876700074845E-7 evalInputDelta=1.3262033462524414E-6
    New Minimum: 0.7467377185821533 > 0.7467331141233444
    WOLFE (weak): th(51.70643256076521)=0.7467331141233444; dx=-1.1987370375928937E-7 evalInputDelta=5.930662155151367E-6
    New Minimum: 0.7467331141233444 > 0.746709480881691
    WOLFE (weak): th(258.53216280382605)=0.746709480881691; dx=-1.1986825402667452E-7 evalInputDelta=2.956390380859375E-5
    New Minimum: 0.746709480881691 > 0.7465617060661316
    WOLFE (weak): th(1551.1929768229563)=0.7465617060661316; dx=-1.1980397550614533E-7 evalInputDelta=1.7733871936798096E-4
    New Minimum: 0.7465617060661316 > 0.745499387383461
    WOLFE (weak): th(10858.350837760694)=0.745499387383461; dx=-1.1957182645579228E-7 evalInputDelta=0.0012396574020385742
    New Minimum: 0.745499387383461 > 0.7369013726711273
    WOLFE (weak): th(86866.80670208555)=0.7369013726711273; dx=-1.1773289954621692E-7 evalInputDelta=0.009837672114372253
    New Minimum: 0.7369013726711273 > 0.6652076840400696
    END: th(781801.26031877)=0.6652076840400696; dx=-9.824413646651784E-8 evalInputDelta=0.08153136074542999
    Fitness changed from 0.7467390447854996 to 0.6652076840400696
    Iteration 1 complete. Error: 0.6652076840400696 Total: 101.8814; Orientation: 0.0703; Line Search: 79.1529
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/74

...skipping 2005 bytes...

    n 4
    <a id="p-8"></a>![Iteration 4](etc/50fa4e64-e9ab-4f46-9aa5-507c03d3c902.jpg)
    
    Adding measurement 7a3d7252 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.505e+03, gradient 1.276e-04, dot -0.874; [977d25e1-cdbf-48c3-becb-4e626fa50341 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6652076840400696, 0.5461108833551407, 0.4090079963207245, 0.2781539559364319
    LBFGS Accumulation History: 3 points
    Removed measurement 7b24032c to history. Total: 4
    th(0)=0.2781539559364319;dx=-1.629014368455531E-8
    New Minimum: 0.2781539559364319 > 0.17429810762405396
    END: th(1.684339755941405E7)=0.17429810762405396; dx=-3.2789034973392456E-9 evalInputDelta=0.10385584831237793
    Fitness changed from 0.2781539559364319 to 0.17429810762405396
    Iteration 5 complete. Error: 0.17429810762405396 Total: 25.9533; Orientation: 2.1088; Line Search: 15.5937
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/4aaaa9c1-b061-456f-b4a2-b07ff33d4491.jpg)
    
    Adding measurement 3f53b38f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.410e+03, gradient 1.127e-04, dot -0.734; [977d25e1-cdbf-48c3-becb-4e626fa50341 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.5461108833551407, 0.4090079963207245, 0.2781539559364319, 0.17429810762405396
    LBFGS Accumulation History: 3 points
    Removed measurement 64917f70 to history. Total: 4
    th(0)=0.17429810762405396;dx=-1.2707817551298198E-8
    New Minimum: 0.17429810762405396 > 0.15990954637527466
    WOLF (strong): th(3.6288E7)=0.15990954637527466; dx=1.6747585013331242E-9 evalInputDelta=0.014388561248779297
    New Minimum: 0.15990954637527466 > 0.11559450626373291
    END: th(1.8144E7)=0.11559450626373291; dx=-1.73572861828748E-10 evalInputDelta=0.058703601360321045
    Fitness changed from 0.17429810762405396 to 0.11559450626373291
    Iteration 6 complete. Error: 0.11559450626373291 Total: 32.2916; Orientation: 1.9311; Line Search: 23.0119
    Final threshold in iteration 7: 0.11559450626373291 (> -Infinity) after 234.193s (< 720.000s)
    

Returns:

    0.11559450626373291