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 1946.58 seconds (16.325 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: 694009318016400
    Reset training subject: 694032647752600
    Adding measurement 711bed2b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=7.0285908579826355;dx=-1.6962641238484913E-5
    New Minimum: 7.0285908579826355 > 7.028573252260685
    WOLFE (weak): th(2.154434690031884)=7.028573252260685; dx=-1.6947598431809277E-5 evalInputDelta=1.7605721950531006E-5
    New Minimum: 7.028573252260685 > 7.028555698692799
    WOLFE (weak): th(4.308869380063768)=7.028555698692799; dx=-1.6947322518143325E-5 evalInputDelta=3.5159289836883545E-5
    New Minimum: 7.028555698692799 > 7.028485924005508
    WOLFE (weak): th(12.926608140191302)=7.028485924005508; dx=-1.6945863900213184E-5 evalInputDelta=1.049339771270752E-4
    New Minimum: 7.028485924005508 > 7.028171993792057
    WOLFE (weak): th(51.70643256076521)=7.028171993792057; dx=-1.6947289307162132E-5 evalInputDelta=4.188641905784607E-4
    New Minimum: 7.028171993792057 > 7.02649661898613
    WOLFE (weak): th(258.53216280382605)=7.02649661898613; dx=-1.695329861177475E-5 evalInputDelta=0.0020942389965057373
    New Minimum: 7.02649661898613 > 7.016009271144867
    WOLFE (weak): th(1551.1929768229563)=7.016009271144867; dx=-1.6992382372967534E-5 evalInputDelta=0.012581586837768555
    New Minimum: 7.016009271144867 > 6.939622834324837
    WOLFE (weak): th(10858.350837760694)=6.939622834324837; dx=-1.7202228604172236E-5 evalInputDelta=0.08896802365779877
    New Minimum: 6.939622834324837 > 6.325425244867802
    WOLFE (weak): th(86866.80670208555)=6.325425244867802; dx=-1.562161650497996E-5 evalInputDelta=0.7031656131148338
    New Minimum: 6.325425244867802 > 3.2965315133333206
    END: th(781801.26031877)=3.2965315133333206; dx=-5.206817957394982E-6 evalInputDelta=3.732059344649315
    Fitness changed from 7.0285908579826355 to 3.2965315133333206
    Iteration 1 complete. Error: 3.2965315133333206 Total: 292.9614; Orientation: 0.0603; Line Search: 225.0978
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/7f6ac74e-3e8a-48e1-93cf-6ca

...skipping 15555 bytes...

    52-a17d-b49ba5b89e1c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -4.091908833011985, -4.13738976418972, -4.179140971973538, -4.21748186647892
    LBFGS Accumulation History: 3 points
    Removed measurement 14559ea4 to history. Total: 4
    th(0)=-4.21748186647892;dx=-7.815904160918318E-8
    Armijo: th(1.8851303537778996E7)=-3.976038372144103; dx=4.337354273761001E-8 evalInputDelta=-0.24144349433481693
    Armijo: th(9425651.768889498)=-4.206703346222639; dx=2.1480070547629995E-8 evalInputDelta=-0.010778520256280899
    New Minimum: -4.21748186647892 > -4.268499240279198
    END: th(3141883.922963166)=-4.268499240279198; dx=-2.0606793306834212E-8 evalInputDelta=0.05101737380027771
    Fitness changed from -4.21748186647892 to -4.268499240279198
    Iteration 19 complete. Error: -4.268499240279198 Total: 112.8593; Orientation: 1.0831; Line Search: 89.6164
    Adding measurement 21d96dda to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.780e+03, gradient 2.346e-04, dot -0.649; [c68c4d60-c1a8-4a52-a17d-b49ba5b89e1c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -4.13738976418972, -4.179140971973538, -4.21748186647892, -4.268499240279198
    LBFGS Accumulation History: 3 points
    Removed measurement 5ea38308 to history. Total: 4
    th(0)=-4.268499240279198;dx=-5.503640467516894E-8
    New Minimum: -4.268499240279198 > -4.297153569757938
    WOLF (strong): th(6768983.715685308)=-4.297153569757938; dx=6.713910989228937E-10 evalInputDelta=0.028654329478740692
    New Minimum: -4.297153569757938 > -4.3050481751561165
    END: th(3384491.857842654)=-4.3050481751561165; dx=-1.8348063526185533E-8 evalInputDelta=0.03654893487691879
    Fitness changed from -4.268499240279198 to -4.3050481751561165
    Iteration 20 complete. Error: -4.3050481751561165 Total: 90.4472; Orientation: 1.1025; Line Search: 66.9928
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/dd1d163e-4eec-49b8-b1c6-16db45f6357e.jpg)
    
    Final threshold in iteration 21: -4.3050481751561165 (> -Infinity) after 1946.564s (< 5400.000s)
    

Returns:

    -4.3050481751561165