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 44.60 seconds (0.916 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: 930911836472700
    Reset training subject: 930913538765900
    Adding measurement 32a09073 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.705065959133208;dx=-4.041386139345808E-4
    New Minimum: 3.705065959133208 > 3.704433670034632
    WOLFE (weak): th(2.154434690031884)=3.704433670034632; dx=-4.0627784972450314E-4 evalInputDelta=6.322890985757113E-4
    New Minimum: 3.704433670034632 > 3.7037989965174347
    WOLFE (weak): th(4.308869380063768)=3.7037989965174347; dx=-4.073268833309235E-4 evalInputDelta=0.0012669626157730818
    New Minimum: 3.7037989965174347 > 3.7012450215406716
    WOLFE (weak): th(12.926608140191302)=3.7012450215406716; dx=-4.1161398388796694E-4 evalInputDelta=0.003820937592536211
    New Minimum: 3.7012450215406716 > 3.689515725011006
    WOLFE (weak): th(51.70643256076521)=3.689515725011006; dx=-4.315189093091032E-4 evalInputDelta=0.0155502341222018
    New Minimum: 3.689515725011006 > 3.6275345135945827
    END: th(258.53216280382605)=3.6275345135945827; dx=-2.791304437641118E-4 evalInputDelta=0.07753144553862512
    Fitness changed from 3.705065959133208 to 3.6275345135945827
    Iteration 1 complete. Error: 3.6275345135945827 Total: 15.0210; Orientation: 0.0149; Line Search: 9.9515
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/893adcf6-1ca6-4002-85b0-7f08a57c2dc9.jpg)
    
    Adding measurement 345c30d to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=3.6275345135945827;dx=-3.5248386686833244E-4
    New Minimum: 3.6275345135945827 > 3.4781178748235106
    END: th(556.9906600335335)=3.4781178748235106; dx=-2.7192360748828616E-4 evalInputDelta=0.14941663877107203
    Fitness changed from 3.6275345135945827 to 3.4781178748235106
    Iteration 2 complete. Error: 3.4781178748235106 Total: 4.8541; Orientation: 0.0153; Line Search: 3.3255
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/4119a8a5-920c-4e65-a452-04a6a1783cda.jpg)
    
    Adding measurement 2a1764de to history. Total: 2
    LBFGS Accumulation History: 3 poi

...skipping 1388 bytes...

    surement 27b98ef0 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.111e+01, gradient 1.060e-02, dot -0.761; [fbc413bb-4111-4902-a0bd-3704749a0f33 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.6275345135945827, 3.4781178748235106, 3.3026619548909366, 3.186799257993698
    LBFGS Accumulation History: 3 points
    Removed measurement 345c30d to history. Total: 4
    th(0)=3.186799257993698;dx=-1.1242168941864145E-4
    New Minimum: 3.186799257993698 > 3.098574730101973
    END: th(5569.9066003353355)=3.098574730101973; dx=-7.567651906384756E-6 evalInputDelta=0.0882245278917253
    Fitness changed from 3.186799257993698 to 3.098574730101973
    Iteration 5 complete. Error: 3.098574730101973 Total: 5.2775; Orientation: 0.4444; Line Search: 3.1954
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/ab1eb5a2-37a7-4502-a198-ce9ecb8933b4.jpg)
    
    Adding measurement 6f49dfd5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.468e+01, gradient 8.546e-03, dot -0.763; [fbc413bb-4111-4902-a0bd-3704749a0f33 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.4781178748235106, 3.3026619548909366, 3.186799257993698, 3.098574730101973
    LBFGS Accumulation History: 3 points
    Removed measurement 2a1764de to history. Total: 4
    th(0)=3.098574730101973;dx=-7.303123375816311E-5
    New Minimum: 3.098574730101973 > 3.063675564015284
    WOLF (strong): th(12000.000000000002)=3.063675564015284; dx=2.1398940996954936E-6 evalInputDelta=0.03489916608668864
    New Minimum: 3.063675564015284 > 3.0516895269975066
    WOLF (strong): th(6000.000000000001)=3.0516895269975066; dx=4.085631683612053E-6 evalInputDelta=0.0468852031044662
    END: th(2000.0000000000002)=3.057033486664295; dx=-1.1390676416763837E-5 evalInputDelta=0.04154124343767762
    Fitness changed from 3.098574730101973 to 3.0516895269975066
    Iteration 6 complete. Error: 3.0516895269975066 Total: 8.6868; Orientation: 0.4422; Line Search: 6.5961
    Final threshold in iteration 7: 3.0516895269975066 (> -Infinity) after 44.597s (< 720.000s)
    

Returns:

    3.0516895269975066