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 67.32 seconds (2.730 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: 609019291332
    Reset training subject: 610668886744
    Adding measurement 56cfcd0b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=20.223439786583185;dx=-1.991396623807498E-5
    New Minimum: 20.223439786583185 > 20.223360325209796
    WOLFE (weak): th(2.154434690031884)=20.223360325209796; dx=-1.989061541432413E-5 evalInputDelta=7.946137338876724E-5
    New Minimum: 20.223360325209796 > 20.22328031808138
    WOLFE (weak): th(4.308869380063768)=20.22328031808138; dx=-1.989278466473831E-5 evalInputDelta=1.5946850180625916E-4
    New Minimum: 20.22328031808138 > 20.22296141460538
    WOLFE (weak): th(12.926608140191302)=20.22296141460538; dx=-1.992617075381047E-5 evalInputDelta=4.783719778060913E-4
    New Minimum: 20.22296141460538 > 20.221520074643195
    WOLFE (weak): th(51.70643256076521)=20.221520074643195; dx=-2.0188954129436216E-5 evalInputDelta=0.0019197119399905205
    New Minimum: 20.221520074643195 > 20.213764642365277
    WOLFE (weak): th(258.53216280382605)=20.213764642365277; dx=-2.0251543856554097E-5 evalInputDelta=0.009675144217908382
    New Minimum: 20.213764642365277 > 20.16469438187778
    WOLFE (weak): th(1551.1929768229563)=20.16469438187778; dx=-2.095462973410375E-5 evalInputDelta=0.058745404705405235
    New Minimum: 20.16469438187778 > 19.822719076648355
    WOLFE (weak): th(10858.350837760694)=19.822719076648355; dx=-1.8976872390225007E-5 evalInputDelta=0.40072070993483067
    New Minimum: 19.822719076648355 > 18.477953877300024
    END: th(86866.80670208555)=18.477953877300024; dx=-7.236080105292315E-6 evalInputDelta=1.7454859092831612
    Fitness changed from 20.223439786583185 to 18.477953877300024
    Iteration 1 complete. Error: 18.477953877300024 Total: 17.8398; Orientation: 0.0325; Line Search: 13.3062
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/ec467ee3-c9bf-4de2-9f5a-e74bbd5f44dd.jpg)
    
    Adding measurement daad258 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=18.477953877300024;dx=-5.249348357469319E-5
    New Minimum: 18.477953877300024 > 1

...skipping 5733 bytes...

    d: LBFGS Orientation magnitude: 1.138e+03, gradient 2.526e-03, dot -0.167; [7154bd88-ccfb-4768-8f9d-c61ba2bc3a8c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.6141059398651123, 14.014207348227501, 18.477953877300024, 20.223439786583185
    LBFGS Accumulation History: 3 points
    Removed measurement 2adb4b9 to history. Total: 3
    th(0)=1.6141059398651123;dx=-6.357507772075558E-6
    Armijo: th(1120000.0000000007)=3.0828761905431747; dx=6.071182466412211E-7 evalInputDelta=-1.4687702506780624
    Armijo: th(560000.0000000003)=2.0938000082969666; dx=1.0649939680588897E-6 evalInputDelta=-0.47969406843185425
    New Minimum: 1.6141059398651123 > 1.4409266710281372
    WOLF (strong): th(186666.66666666677)=1.4409266710281372; dx=4.3103336355988003E-7 evalInputDelta=0.1731792688369751
    END: th(46666.66666666669)=1.4736792743206024; dx=-6.540004279141552E-7 evalInputDelta=0.1404266655445099
    Fitness changed from 1.6141059398651123 to 1.4409266710281372
    Iteration 9 complete. Error: 1.4409266710281372 Total: 8.7358; Orientation: 0.0562; Line Search: 7.3737
    Adding measurement 7d68a773 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.666e+02, gradient 1.163e-03, dot -0.264; [7154bd88-ccfb-4768-8f9d-c61ba2bc3a8c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.4409266710281372, 14.014207348227501, 18.477953877300024, 20.223439786583185
    LBFGS Accumulation History: 3 points
    Removed measurement 7d68a773 to history. Total: 3
    th(0)=1.4409266710281372;dx=-1.3337058197406326E-6
    New Minimum: 1.4409266710281372 > 1.2717187106609344
    END: th(100540.2855348213)=1.2717187106609344; dx=-6.176397566747216E-7 evalInputDelta=0.16920796036720276
    Fitness changed from 1.4409266710281372 to 1.2717187106609344
    Iteration 10 complete. Error: 1.2717187106609344 Total: 4.1034; Orientation: 0.1328; Line Search: 2.5396
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/f81e03c9-8b6a-4bf0-80d1-3444ce5db5fd.jpg)
    
    Final threshold in iteration 11: 1.2717187106609344 (> -Infinity) after 67.309s (< 1800.000s)
    

Returns:

    1.2717187106609344