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 198.40 seconds (2.867 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: 1780074162149
    Reset training subject: 1784011643175
    Adding measurement 6eca715 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.0740063786506653;dx=-6.812038461483114E-8
    New Minimum: 3.0740063786506653 > 3.0740061700344086
    WOLFE (weak): th(2.154434690031884)=3.0740061700344086; dx=-6.814251540411245E-8 evalInputDelta=2.086162567138672E-7
    New Minimum: 3.0740061700344086 > 3.0740055441856384
    WOLFE (weak): th(4.308869380063768)=3.0740055441856384; dx=-6.813449823950366E-8 evalInputDelta=8.344650268554688E-7
    New Minimum: 3.0740055441856384 > 3.0740044862031937
    WOLFE (weak): th(12.926608140191302)=3.0740044862031937; dx=-6.815830433441154E-8 evalInputDelta=1.8924474716186523E-6
    New Minimum: 3.0740044862031937 > 3.073999658226967
    WOLFE (weak): th(51.70643256076521)=3.073999658226967; dx=-6.808410920157154E-8 evalInputDelta=6.720423698425293E-6
    New Minimum: 3.073999658226967 > 3.0739726573228836
    WOLFE (weak): th(258.53216280382605)=3.0739726573228836; dx=-6.808344687795492E-8 evalInputDelta=3.3721327781677246E-5
    New Minimum: 3.0739726573228836 > 3.073803201317787
    WOLFE (weak): th(1551.1929768229563)=3.073803201317787; dx=-6.809335876129929E-8 evalInputDelta=2.031773328781128E-4
    New Minimum: 3.073803201317787 > 3.07258677482605
    WOLFE (weak): th(10858.350837760694)=3.07258677482605; dx=-6.802068823979179E-8 evalInputDelta=0.0014196038246154785
    New Minimum: 3.07258677482605 > 3.062691241502762
    WOLFE (weak): th(86866.80670208555)=3.062691241502762; dx=-6.754718356816132E-8 evalInputDelta=0.011315137147903442
    New Minimum: 3.062691241502762 > 2.9757473170757294
    WOLFE (weak): th(781801.26031877)=2.9757473170757294; dx=-6.306315368711323E-8 evalInputDelta=0.09825906157493591
    New Minimum: 2.9757473170757294 > 2.4687334448099136
    END: th(7818012.6031877)=2.4687334448099136; dx=-2.4132123846462103E-8 evalInputDelta=0.6052729338407516
    Fitness changed from 3.0740063786506653 to 2.4687334448099136
    Iteration 1 complete. Error: 2.4687334448099136 Tota

...skipping 6370 bytes...

    b746-d9878c0412b7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.47773413360118866, 2.0337240993976593, 2.4687334448099136, 3.0740063786506653
    LBFGS Accumulation History: 3 points
    Removed measurement 5dbf8532 to history. Total: 3
    th(0)=0.47773413360118866;dx=-1.278620625375774E-8
    New Minimum: 0.47773413360118866 > 0.46879416704177856
    WOLF (strong): th(2.5200000000000007E7)=0.46879416704177856; dx=2.3291885656520954E-9 evalInputDelta=0.008939966559410095
    New Minimum: 0.46879416704177856 > 0.38591085374355316
    END: th(1.2600000000000004E7)=0.38591085374355316; dx=-8.565802861128712E-10 evalInputDelta=0.0918232798576355
    Fitness changed from 0.47773413360118866 to 0.38591085374355316
    Iteration 9 complete. Error: 0.38591085374355316 Total: 16.2226; Orientation: 0.4012; Line Search: 12.1198
    Adding measurement 281b44c3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.248e+04, gradient 1.175e-04, dot -0.589; [d4263934-c78c-4141-b746-d9878c0412b7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.38591085374355316, 2.0337240993976593, 2.4687334448099136, 3.0740063786506653
    LBFGS Accumulation History: 3 points
    Removed measurement 281b44c3 to history. Total: 3
    th(0)=0.38591085374355316;dx=-1.3772038291558274E-8
    Armijo: th(2.7145877094401743E7)=0.445289209485054; dx=4.414995532497366E-9 evalInputDelta=-0.059378355741500854
    New Minimum: 0.38591085374355316 > 0.3001672029495239
    WOLF (strong): th(1.3572938547200872E7)=0.3001672029495239; dx=1.5334250804811765E-9 evalInputDelta=0.08574365079402924
    END: th(4524312.849066957)=0.31136268377304077; dx=-8.417911485194999E-9 evalInputDelta=0.07454816997051239
    Fitness changed from 0.38591085374355316 to 0.3001672029495239
    Iteration 10 complete. Error: 0.3001672029495239 Total: 20.3804; Orientation: 0.3313; Line Search: 16.1080
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/8acf8560-c891-4736-8fc5-2bcb14e462ba.jpg)
    
    Final threshold in iteration 11: 0.3001672029495239 (> -Infinity) after 198.399s (< 3600.000s)
    

Returns:

    0.3001672029495239