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 713.47 seconds (6.081 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: 6138365586492
    Reset training subject: 6153683019906
    Adding measurement 1e8e38ff to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.790267691016197;dx=-3.6208899146141646E-7
    New Minimum: 8.790267691016197 > 8.790267415344715
    WOLFE (weak): th(2.154434690031884)=8.790267415344715; dx=-3.6191640048522014E-7 evalInputDelta=2.7567148208618164E-7
    New Minimum: 8.790267415344715 > 8.790266662836075
    WOLFE (weak): th(4.308869380063768)=8.790266662836075; dx=-3.61913191629125E-7 evalInputDelta=1.0281801223754883E-6
    New Minimum: 8.790266662836075 > 8.79026260972023
    WOLFE (weak): th(12.926608140191302)=8.79026260972023; dx=-3.619158411509098E-7 evalInputDelta=5.081295967102051E-6
    New Minimum: 8.79026260972023 > 8.790244907140732
    WOLFE (weak): th(51.70643256076521)=8.790244907140732; dx=-3.619284774467011E-7 evalInputDelta=2.2783875465393066E-5
    New Minimum: 8.790244907140732 > 8.790154807269573
    WOLFE (weak): th(258.53216280382605)=8.790154807269573; dx=-3.6199804109660985E-7 evalInputDelta=1.1288374662399292E-4
    New Minimum: 8.790154807269573 > 8.78958922624588
    WOLFE (weak): th(1551.1929768229563)=8.78958922624588; dx=-3.620045533585125E-7 evalInputDelta=6.784647703170776E-4
    New Minimum: 8.78958922624588 > 8.785520419478416
    WOLFE (weak): th(10858.350837760694)=8.785520419478416; dx=-3.619533356615295E-7 evalInputDelta=0.004747271537780762
    New Minimum: 8.785520419478416 > 8.752350270748138
    WOLFE (weak): th(86866.80670208555)=8.752350270748138; dx=-3.5979755379753154E-7 evalInputDelta=0.03791742026805878
    New Minimum: 8.752350270748138 > 8.458454720675945
    WOLFE (weak): th(781801.26031877)=8.458454720675945; dx=-3.355890103856744E-7 evalInputDelta=0.3318129703402519
    New Minimum: 8.458454720675945 > 6.62355449795723
    END: th(7818012.6031877)=6.62355449795723; dx=-1.35621225850764E-7 evalInputDelta=2.1667131930589676
    Fitness changed from 8.790267691016197 to 6.62355449795723
    Iteration 1 complete. Error: 6.62355449795723 Total: 201.7743; Orientation: 0.

...skipping 6210 bytes...

     measurement 48fc74be to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.446e+03, gradient 1.711e-04, dot -0.450; [a014a03c-b7a1-4b22-94d7-5a8e69c51797 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.9438164457678795, 4.650552868843079, 6.62355449795723, 8.790267691016197
    LBFGS Accumulation History: 3 points
    Removed measurement 48fc74be to history. Total: 3
    th(0)=0.9438164457678795;dx=-2.9269257081086796E-8
    Armijo: th(3.7800000000000015E7)=1.4359637945890427; dx=2.8263568268027223E-8 evalInputDelta=-0.4921473488211632
    New Minimum: 0.9438164457678795 > 0.8652110248804092
    WOLF (strong): th(1.8900000000000007E7)=0.8652110248804092; dx=1.3505057220251166E-8 evalInputDelta=0.07860542088747025
    New Minimum: 0.8652110248804092 > 0.7950904369354248
    END: th(6300000.000000003)=0.7950904369354248; dx=-1.19570913876755E-8 evalInputDelta=0.14872600883245468
    Fitness changed from 0.9438164457678795 to 0.7950904369354248
    Iteration 9 complete. Error: 0.7950904369354248 Total: 72.1292; Orientation: 1.5509; Line Search: 56.4276
    Adding measurement 288a685f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.631e+03, gradient 1.257e-04, dot -0.516; [a014a03c-b7a1-4b22-94d7-5a8e69c51797 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.7950904369354248, 4.650552868843079, 6.62355449795723, 8.790267691016197
    LBFGS Accumulation History: 3 points
    Removed measurement 288a685f to history. Total: 3
    th(0)=0.7950904369354248;dx=-1.5801210303753054E-8
    New Minimum: 0.7950904369354248 > 0.6617241576313972
    END: th(1.3572938547200873E7)=0.6617241576313972; dx=-8.329575180994539E-9 evalInputDelta=0.13336627930402756
    Fitness changed from 0.7950904369354248 to 0.6617241576313972
    Iteration 10 complete. Error: 0.6617241576313972 Total: 44.3007; Orientation: 1.5455; Line Search: 27.8206
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/8dda5349-34cf-454f-9aff-6355189d1a09.jpg)
    
    Final threshold in iteration 11: 0.6617241576313972 (> -Infinity) after 713.472s (< 3600.000s)
    

Returns:

    0.6617241576313972