Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:88 executed in 980.87 seconds (8.326 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    val trainer = new IterativeTrainer(trainable)
    trainer.setOrientation(orientation())
    trainer.setMonitor(new TrainingMonitor() {
      override def clear(): Unit = trainingMonitor.clear()
  
      override def log(msg: String): Unit = {
        trainingMonitor.log(msg)
        BasicOptimizer.this.log(msg)
      }
  
      override def onStepFail(currentPoint: Step): Boolean = {
        BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
        trainingMonitor.onStepComplete(currentPoint)
        super.onStepComplete(currentPoint)
      }
    })
    trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
    trainer.setMaxIterations(trainingIterations)
    trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
    trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
    val result = trainer.run.asInstanceOf[lang.Double]
    trainer.freeRef()
    result

Logging:

    Reset training subject: 7171207384147
    Reset training subject: 7191888570189
    Adding measurement dee79a0 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=9.326235324144363;dx=-1.7727523995257105E-7
    New Minimum: 9.326235324144363 > 9.326235190033913
    WOLFE (weak): th(2.154434690031884)=9.326235190033913; dx=-1.7664489217369028E-7 evalInputDelta=1.341104507446289E-7
    New Minimum: 9.326235190033913 > 9.326234549283981
    WOLFE (weak): th(4.308869380063768)=9.326234549283981; dx=-1.7662888962048385E-7 evalInputDelta=7.748603820800781E-7
    New Minimum: 9.326234549283981 > 9.326232060790062
    WOLFE (weak): th(12.926608140191302)=9.326232060790062; dx=-1.7663563761235122E-7 evalInputDelta=3.2633543014526367E-6
    New Minimum: 9.326232060790062 > 9.326221957802773
    WOLFE (weak): th(51.70643256076521)=9.326221957802773; dx=-1.7663574681444515E-7 evalInputDelta=1.3366341590881348E-5
    New Minimum: 9.326221957802773 > 9.326168775558472
    WOLFE (weak): th(258.53216280382605)=9.326168775558472; dx=-1.7663679219993607E-7 evalInputDelta=6.654858589172363E-5
    New Minimum: 9.326168775558472 > 9.325834065675735
    WOLFE (weak): th(1551.1929768229563)=9.325834065675735; dx=-1.7662555612931275E-7 evalInputDelta=4.012584686279297E-4
    New Minimum: 9.325834065675735 > 9.3234274238348
    WOLFE (weak): th(10858.350837760694)=9.3234274238348; dx=-1.7658809249116728E-7 evalInputDelta=0.002807900309562683
    New Minimum: 9.3234274238348 > 9.303791783750057
    WOLFE (weak): th(86866.80670208555)=9.303791783750057; dx=-1.7620057664738993E-7 evalInputDelta=0.022443540394306183
    New Minimum: 9.303791783750057 > 9.127327591180801
    WOLFE (weak): th(781801.26031877)=9.127327591180801; dx=-1.6994934140376364E-7 evalInputDelta=0.198907732963562
    New Minimum: 9.127327591180801 > 7.848031625151634
    END: th(7818012.6031877)=7.848031625151634; dx=-8.351366325135274E-8 evalInputDelta=1.4782036989927292
    Fitness changed from 9.326235324144363 to 7.848031625151634
    Iteration 1 complete. Error: 7.848031625151634 Total: 280.6771; Orient

...skipping 6217 bytes...

    1306874752045 Total: 103.7439; Orientation: 1.8862; Line Search: 81.4649
    Adding measurement 7d274a25 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.472e+03, gradient 1.131e-04, dot -0.341; [c0f645ec-f4d1-4323-824b-ba9d86c69c99 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.04581306874752045, 6.232104524970055, 7.848031625151634, 9.326235324144363
    LBFGS Accumulation History: 3 points
    Removed measurement 7d274a25 to history. Total: 3
    th(0)=0.04581306874752045;dx=-1.2780306069113098E-8
    New Minimum: 0.04581306874752045 > -0.24336500465869904
    END: th(3.7800000000000015E7)=-0.24336500465869904; dx=-3.296993654952794E-10 evalInputDelta=0.2891780734062195
    Fitness changed from 0.04581306874752045 to -0.24336500465869904
    Iteration 9 complete. Error: -0.24336500465869904 Total: 60.2583; Orientation: 1.8532; Line Search: 38.7781
    Adding measurement 4937938e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.523e+03, gradient 8.172e-05, dot -0.407; [c0f645ec-f4d1-4323-824b-ba9d86c69c99 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.24336500465869904, 6.232104524970055, 7.848031625151634, 9.326235324144363
    LBFGS Accumulation History: 3 points
    Removed measurement 4937938e to history. Total: 3
    th(0)=-0.24336500465869904;dx=-6.676203697324991E-9
    New Minimum: -0.24336500465869904 > -0.32995110750198364
    WOLF (strong): th(8.143763128320524E7)=-0.32995110750198364; dx=2.1817172295205513E-9 evalInputDelta=0.0865861028432846
    New Minimum: -0.32995110750198364 > -0.4333229660987854
    END: th(4.071881564160262E7)=-0.4333229660987854; dx=-1.3117426975511263E-9 evalInputDelta=0.18995796144008636
    Fitness changed from -0.24336500465869904 to -0.4333229660987854
    Iteration 10 complete. Error: -0.4333229660987854 Total: 81.6350; Orientation: 1.8426; Line Search: 58.2427
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/b252fd3f-9aff-453b-8686-8ff6dd8ab926.jpg)
    
    Final threshold in iteration 11: -0.4333229660987854 (> -Infinity) after 980.873s (< 3600.000s)
    

Returns:

    -0.4333229660987854