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 32.90 seconds (0.680 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: 917298480520400
    Reset training subject: 917299575310300
    Adding measurement e7de973 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.9717542231082916;dx=-2.547762153918947E-7
    New Minimum: 0.9717542231082916 > 0.9717539548873901
    WOLFE (weak): th(2.154434690031884)=0.9717539548873901; dx=-2.5470581756164447E-7 evalInputDelta=2.682209014892578E-7
    New Minimum: 0.9717539548873901 > 0.9717535674571991
    WOLFE (weak): th(4.308869380063768)=0.9717535674571991; dx=-2.5470573283794747E-7 evalInputDelta=6.556510925292969E-7
    New Minimum: 0.9717535674571991 > 0.9717518389225006
    WOLFE (weak): th(12.926608140191302)=0.9717518389225006; dx=-2.547053027186887E-7 evalInputDelta=2.384185791015625E-6
    New Minimum: 0.9717518389225006 > 0.971744179725647
    WOLFE (weak): th(51.70643256076521)=0.971744179725647; dx=-2.547010530228723E-7 evalInputDelta=1.004338264465332E-5
    New Minimum: 0.971744179725647 > 0.9717043042182922
    WOLFE (weak): th(258.53216280382605)=0.9717043042182922; dx=-2.5465350125128293E-7 evalInputDelta=4.991888999938965E-5
    New Minimum: 0.9717043042182922 > 0.9714545011520386
    WOLFE (weak): th(1551.1929768229563)=0.9714545011520386; dx=-2.5446330692761743E-7 evalInputDelta=2.9972195625305176E-4
    New Minimum: 0.9714545011520386 > 0.969660758972168
    WOLFE (weak): th(10858.350837760694)=0.969660758972168; dx=-2.53651168364674E-7 evalInputDelta=0.0020934641361236572
    New Minimum: 0.969660758972168 > 0.9552153944969177
    WOLFE (weak): th(86866.80670208555)=0.9552153944969177; dx=-2.4814118538403686E-7 evalInputDelta=0.0165388286113739
    New Minimum: 0.9552153944969177 > 0.8410597443580627
    END: th(781801.26031877)=0.8410597443580627; dx=-1.901355424378615E-7 evalInputDelta=0.13069447875022888
    Fitness changed from 0.9717542231082916 to 0.8410597443580627
    Iteration 1 complete. Error: 0.8410597443580627 Total: 13.8737; Orientation: 0.0141; Line Search: 10.7094
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/91d885be-0

...skipping 1934 bytes...

    253; Orientation: 0.4158; Line Search: 2.1699
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/809b7080-dadf-41a2-b9dc-ac8e12b35b6e.jpg)
    
    Adding measurement 5e5ff66a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.378e+03, gradient 2.266e-04, dot -0.776; [a96a8ed2-23b3-4ea5-8414-69d68bc5de86 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.8410597443580627, 0.6673276424407959, 0.48843878507614136, 0.34655892848968506
    LBFGS Accumulation History: 3 points
    Removed measurement 205a030e to history. Total: 4
    th(0)=0.34655892848968506;dx=-5.1352891188452706E-8
    New Minimum: 0.34655892848968506 > 0.2557182312011719
    END: th(1.684339755941405E7)=0.2557182312011719; dx=-3.713867666481153E-9 evalInputDelta=0.09084069728851318
    Fitness changed from 0.34655892848968506 to 0.2557182312011719
    Iteration 5 complete. Error: 0.2557182312011719 Total: 3.6103; Orientation: 0.4186; Line Search: 2.1454
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/b31e7c33-d24f-4163-941d-56d8ecd3f00d.jpg)
    
    Adding measurement 3779347a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.041e+03, gradient 2.011e-04, dot -0.730; [a96a8ed2-23b3-4ea5-8414-69d68bc5de86 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6673276424407959, 0.48843878507614136, 0.34655892848968506, 0.2557182312011719
    LBFGS Accumulation History: 3 points
    Removed measurement 2d1b1d0d to history. Total: 4
    th(0)=0.2557182312011719;dx=-4.0421765301717593E-8
    Armijo: th(3.6288E7)=0.3435657024383545; dx=5.794962218910581E-9 evalInputDelta=-0.08784747123718262
    New Minimum: 0.2557182312011719 > 0.16195842623710632
    END: th(1.8144E7)=0.16195842623710632; dx=-9.945490321010942E-10 evalInputDelta=0.09375980496406555
    Fitness changed from 0.2557182312011719 to 0.16195842623710632
    Iteration 6 complete. Error: 0.16195842623710632 Total: 4.6638; Orientation: 0.4175; Line Search: 3.1958
    Final threshold in iteration 7: 0.16195842623710632 (> -Infinity) after 32.901s (< 720.000s)
    

Returns:

    0.16195842623710632