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 31.06 seconds (0.904 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: 930635940917200
    Reset training subject: 930637172862600
    Adding measurement 5d90cd97 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=4.694125540088862;dx=-0.0011081710650346212
    New Minimum: 4.694125540088862 > 4.693926701322198
    WOLFE (weak): th(2.154434690031884)=4.693926701322198; dx=-0.001104706653497427 evalInputDelta=1.9883876666426659E-4
    New Minimum: 4.693926701322198 > 4.693727864418179
    WOLFE (weak): th(4.308869380063768)=4.693727864418179; dx=-0.0010997338879727538 evalInputDelta=3.9767567068338394E-4
    New Minimum: 4.693727864418179 > 4.692911538761109
    WOLFE (weak): th(12.926608140191302)=4.692911538761109; dx=-0.0010840958585660958 evalInputDelta=0.001214001327753067
    New Minimum: 4.692911538761109 > 4.689449309837073
    WOLFE (weak): th(51.70643256076521)=4.689449309837073; dx=-0.0010213184719773827 evalInputDelta=0.004676230251789093
    New Minimum: 4.689449309837073 > 4.6529378816485405
    END: th(258.53216280382605)=4.6529378816485405; dx=-8.52420296893396E-4 evalInputDelta=0.041187658440321684
    Fitness changed from 4.694125540088862 to 4.6529378816485405
    Iteration 1 complete. Error: 4.6529378816485405 Total: 11.0651; Orientation: 0.0091; Line Search: 7.1772
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/06d41e3e-a2a2-4d60-9c51-bf5df9d9b0e4.jpg)
    
    Adding measurement 34f22dcf to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=4.6529378816485405;dx=-8.175717305061482E-4
    New Minimum: 4.6529378816485405 > 4.54824406793341
    END: th(556.9906600335335)=4.54824406793341; dx=-6.303416285122251E-4 evalInputDelta=0.10469381371513009
    Fitness changed from 4.6529378816485405 to 4.54824406793341
    Iteration 2 complete. Error: 4.54824406793341 Total: 3.5749; Orientation: 0.0081; Line Search: 2.3760
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/b2427610-f722-4ea3-b3f4-66ef47baad60.jpg)
    
    Adding measurement 7d133220 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)

...skipping 1248 bytes...

    tness changed from 4.2980207812506706 to 4.1355801487807184
    Iteration 4 complete. Error: 4.1355801487807184 Total: 3.5894; Orientation: 0.2223; Line Search: 2.3587
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/c46a4d8f-b156-40a4-84f3-a81fd896f667.jpg)
    
    Adding measurement 2961d455 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.091e+02, gradient 1.112e-02, dot -0.899; [9ba2b45b-3b29-4539-89bf-2847315479fc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 4.6529378816485405, 4.54824406793341, 4.2980207812506706, 4.1355801487807184
    LBFGS Accumulation History: 3 points
    Removed measurement 34f22dcf to history. Total: 4
    th(0)=4.1355801487807184;dx=-1.236055764526562E-4
    New Minimum: 4.1355801487807184 > 3.8679400745313615
    END: th(11139.813200670671)=3.8679400745313615; dx=-3.5834579810950455E-5 evalInputDelta=0.267640074249357
    Fitness changed from 4.1355801487807184 to 3.8679400745313615
    Iteration 5 complete. Error: 3.8679400745313615 Total: 4.4665; Orientation: 0.7982; Line Search: 2.4987
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/87d2a3bd-cfe4-42d3-9314-7cdef8a22cb8.jpg)
    
    Adding measurement 1025e460 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.610e+02, gradient 8.333e-03, dot -0.824; [9ba2b45b-3b29-4539-89bf-2847315479fc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 4.54824406793341, 4.2980207812506706, 4.1355801487807184, 3.8679400745313615
    LBFGS Accumulation History: 3 points
    Removed measurement 7d133220 to history. Total: 4
    th(0)=3.8679400745313615;dx=-6.94438830049414E-5
    New Minimum: 3.8679400745313615 > 3.708757038228214
    END: th(24000.000000000004)=3.708757038228214; dx=-1.663166546753581E-5 evalInputDelta=0.15918303630314767
    Fitness changed from 3.8679400745313615 to 3.708757038228214
    Iteration 6 complete. Error: 3.708757038228214 Total: 3.7843; Orientation: 0.2347; Line Search: 2.3697
    Final threshold in iteration 7: 3.708757038228214 (> -Infinity) after 31.059s (< 720.000s)
    

Returns:

    3.708757038228214