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

Code from BasicOptimizer.scala:75 executed in 3315.44 seconds (31.475 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: 857522047185400
    Reset training subject: 857562695129100
    Adding measurement 5c78f456 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=9.380591332912445;dx=-1.9340246507410842E-6
    New Minimum: 9.380591332912445 > 9.380586445331573
    WOLFE (weak): th(2.154434690031884)=9.380586445331573; dx=-1.9340236977875817E-6 evalInputDelta=4.887580871582031E-6
    New Minimum: 9.380586445331573 > 9.3805832862854
    WOLFE (weak): th(4.308869380063768)=9.3805832862854; dx=-1.934019776497128E-6 evalInputDelta=8.046627044677734E-6
    New Minimum: 9.3805832862854 > 9.380566716194153
    WOLFE (weak): th(12.926608140191302)=9.380566716194153; dx=-1.934011993540453E-6 evalInputDelta=2.4616718292236328E-5
    New Minimum: 9.380566716194153 > 9.38049304485321
    WOLFE (weak): th(51.70643256076521)=9.38049304485321; dx=-1.933988625138379E-6 evalInputDelta=9.828805923461914E-5
    New Minimum: 9.38049304485321 > 9.380101501941681
    WOLFE (weak): th(258.53216280382605)=9.380101501941681; dx=-1.9336490720165812E-6 evalInputDelta=4.898309707641602E-4
    New Minimum: 9.380101501941681 > 9.377655446529388
    WOLFE (weak): th(1551.1929768229563)=9.377655446529388; dx=-1.9317378200857723E-6 evalInputDelta=0.0029358863830566406
    New Minimum: 9.377655446529388 > 9.360112488269806
    WOLFE (weak): th(10858.350837760694)=9.360112488269806; dx=-1.9152650226117683E-6 evalInputDelta=0.02047884464263916
    New Minimum: 9.360112488269806 > 9.220856666564941
    WOLFE (weak): th(86866.80670208555)=9.220856666564941; dx=-1.7949685155335929E-6 evalInputDelta=0.15973466634750366
    New Minimum: 9.220856666564941 > 8.236478805541992
    END: th(781801.26031877)=8.236478805541992; dx=-1.1007233651485292E-6 evalInputDelta=1.1441125273704529
    Fitness changed from 9.380591332912445 to 8.236478805541992
    Iteration 1 complete. Error: 8.236478805541992 Total: 514.9163; Orientation: 0.0683; Line Search: 394.9693
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/b5eb188c-7e7e-4d19-a302-0dba97602a39.jp

...skipping 14984 bytes...

    nt 6.880e-05, dot -0.477; [e56eaa01-eb6f-4f0d-8f26-9a8c5ad65ae8 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.0078671723604202, 0.9837072789669037, 0.9570591971278191, 0.9264429733157158
    LBFGS Accumulation History: 3 points
    Removed measurement 153d14e3 to history. Total: 4
    th(0)=0.9264429733157158;dx=-4.733560194380149E-9
    Armijo: th(1.1310782122667398E8)=1.2660411298274994; dx=4.873420345992615E-9 evalInputDelta=-0.3395981565117836
    Armijo: th(5.655391061333699E7)=1.0000419318675995; dx=2.9432166406342296E-9 evalInputDelta=-0.0735989585518837
    New Minimum: 0.9264429733157158 > 0.9004241153597832
    WOLF (strong): th(1.8851303537778996E7)=0.9004241153597832; dx=5.372077187154178E-10 evalInputDelta=0.026018857955932617
    END: th(4712825.884444749)=0.9090898707509041; dx=-2.8215653977673667E-9 evalInputDelta=0.017353102564811707
    Fitness changed from 0.9264429733157158 to 0.9004241153597832
    Iteration 19 complete. Error: 0.9004241153597832 Total: 238.9206; Orientation: 1.7834; Line Search: 197.1866
    Adding measurement 1b30b6f8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.675e+03, gradient 5.198e-05, dot -0.587; [e56eaa01-eb6f-4f0d-8f26-9a8c5ad65ae8 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.9837072789669037, 0.9570591971278191, 0.9264429733157158, 0.9004241153597832
    LBFGS Accumulation History: 3 points
    Removed measurement f252762 to history. Total: 4
    th(0)=0.9004241153597832;dx=-2.7023411352154687E-9
    New Minimum: 0.9004241153597832 > 0.8821309506893158
    END: th(1.0153475573527962E7)=0.8821309506893158; dx=-1.1270619766245575E-9 evalInputDelta=0.018293164670467377
    Fitness changed from 0.9004241153597832 to 0.8821309506893158
    Iteration 20 complete. Error: 0.8821309506893158 Total: 120.4166; Orientation: 1.8369; Line Search: 79.2154
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/8877dbba-d4fc-4445-aac7-d01489140829.jpg)
    
    Final threshold in iteration 21: 0.8821309506893158 (> -Infinity) after 3315.438s (< 3600.000s)
    

Returns:

    0.8821309506893158