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

Code from BasicOptimizer.scala:75 executed in 5450.31 seconds (91.085 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: 1592174522215800
    Reset training subject: 1592247162222900
    Adding measurement 3ab7b0f to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.7577144702391823;dx=-1.8933951739462596E-6
    New Minimum: 3.7577144702391823 > 3.757714243842067
    WOLFE (weak): th(2.154434690031884)=3.757714243842067; dx=-1.8809216055749513E-6 evalInputDelta=2.26397115277166E-7
    New Minimum: 3.757714243842067 > 3.757713681627916
    WOLFE (weak): th(4.308869380063768)=3.757713681627916; dx=-1.880920326531904E-6 evalInputDelta=7.886112660671074E-7
    New Minimum: 3.757713681627916 > 3.757711063262873
    WOLFE (weak): th(12.926608140191302)=3.757711063262873; dx=-1.880913235661609E-6 evalInputDelta=3.406976309072718E-6
    New Minimum: 3.757711063262873 > 3.7577004654474204
    WOLFE (weak): th(51.70643256076521)=3.7577004654474204; dx=-1.8808729713040062E-6 evalInputDelta=1.4004791761834667E-5
    New Minimum: 3.7577004654474204 > 3.757643975072915
    WOLFE (weak): th(258.53216280382605)=3.757643975072915; dx=-1.8807675327799255E-6 evalInputDelta=7.049516626711494E-5
    New Minimum: 3.757643975072915 > 3.7572917266163555
    WOLFE (weak): th(1551.1929768229563)=3.7572917266163555; dx=-1.8801872210374013E-6 evalInputDelta=4.2274362282679334E-4
    New Minimum: 3.7572917266163555 > 3.7547590968722653
    WOLFE (weak): th(10858.350837760694)=3.7547590968722653; dx=-1.8765508901865494E-6 evalInputDelta=0.00295537336691698
    New Minimum: 3.7547590968722653 > 3.734310791066127
    WOLFE (weak): th(86866.80670208555)=3.734310791066127; dx=-1.8376278666067226E-6 evalInputDelta=0.023403679173055192
    New Minimum: 3.734310791066127 > 3.570232445076149
    END: th(781801.26031877)=3.570232445076149; dx=-1.4264581048635495E-6 evalInputDelta=0.18748202516303314
    Fitness changed from 3.7577144702391823 to 3.570232445076149
    Iteration 1 complete. Error: 3.570232445076149 Total: 968.2317; Orientation: 0.1991; Line Search: 749.3306
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/04d985b5-348b-4

...skipping 11540 bytes...

    itude: 1.426e+04, gradient 4.848e-04, dot -0.708; [7dc55f14-14c8-46c5-a61b-00e8b693a298 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.2595714047512705, 2.2013731245880988, 2.1037932496857183, 2.071365249521435
    LBFGS Accumulation History: 3 points
    Removed measurement 2db15764 to history. Total: 4
    th(0)=2.071365249521435;dx=-2.3506620216183254E-7
    Armijo: th(4666666.666666669)=2.0835099440602547; dx=2.073555488390337E-7 evalInputDelta=-0.0121446945388195
    New Minimum: 2.071365249521435 > 2.040085450554435
    END: th(2333333.3333333344)=2.040085450554435; dx=-1.934464449328831E-8 evalInputDelta=0.03127979896700017
    Fitness changed from 2.071365249521435 to 2.040085450554435
    Iteration 15 complete. Error: 2.040085450554435 Total: 314.4555; Orientation: 5.9287; Line Search: 235.7825
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/c7e08b4d-34d0-4ef6-956d-99ca88f3ccdd.jpg)
    
    Adding measurement 2bf3ec4a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.254e+04, gradient 5.325e-04, dot -0.632; [7dc55f14-14c8-46c5-a61b-00e8b693a298 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.2013731245880988, 2.1037932496857183, 2.071365249521435, 2.040085450554435
    LBFGS Accumulation History: 3 points
    Removed measurement 561f982f to history. Total: 4
    th(0)=2.040085450554435;dx=-2.8352729857641105E-7
    Armijo: th(5027014.276741064)=2.066713288122156; dx=1.3812110331908642E-7 evalInputDelta=-0.026627837567720913
    New Minimum: 2.040085450554435 > 2.0163142804930794
    WOLF (strong): th(2513507.138370532)=2.0163142804930794; dx=4.0991697034199465E-8 evalInputDelta=0.02377117006135565
    END: th(837835.7127901773)=2.0188324988355535; dx=-1.374257772595389E-7 evalInputDelta=0.02125295171888153
    Fitness changed from 2.040085450554435 to 2.0163142804930794
    Iteration 16 complete. Error: 2.0163142804930794 Total: 398.2284; Orientation: 7.2758; Line Search: 317.4179
    Final threshold in iteration 16: 2.0163142804930794 (> -Infinity) after 5450.304s (< 5400.000s)
    

Returns:

    2.0163142804930794