Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Code from BasicOptimizer.scala:75 executed in 62.84 seconds (0.633 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: 931216862243400
    Reset training subject: 931219467923100
    Adding measurement 3d11c116 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.7165898445528;dx=-4.674553169718984E-4
    New Minimum: 3.7165898445528 > 3.7160411081276834
    WOLFE (weak): th(2.154434690031884)=3.7160411081276834; dx=-4.665983654307966E-4 evalInputDelta=5.487364251166582E-4
    New Minimum: 3.7160411081276834 > 3.7154926103539765
    WOLFE (weak): th(4.308869380063768)=3.7154926103539765; dx=-4.652791099746153E-4 evalInputDelta=0.0010972341988235712
    New Minimum: 3.7154926103539765 > 3.713351544458419
    WOLFE (weak): th(12.926608140191302)=3.713351544458419; dx=-4.45691918352761E-4 evalInputDelta=0.0032383000943809748
    New Minimum: 3.713351544458419 > 3.70516822906211
    END: th(51.70643256076521)=3.70516822906211; dx=-3.361541267572851E-4 evalInputDelta=0.011421615490689874
    Fitness changed from 3.7165898445528 to 3.70516822906211
    Iteration 1 complete. Error: 3.70516822906211 Total: 19.6381; Orientation: 0.0322; Line Search: 12.3475
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/e057ab86-59d8-4c67-9a2a-b57289f2615d.jpg)
    
    Adding measurement 3cbf06cc to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=3.70516822906211;dx=-2.956068578898051E-4
    New Minimum: 3.70516822906211 > 3.6896701510995626
    END: th(111.39813200670669)=3.6896701510995626; dx=-2.6342233635452065E-4 evalInputDelta=0.01549807796254754
    Fitness changed from 3.70516822906211 to 3.6896701510995626
    Iteration 2 complete. Error: 3.6896701510995626 Total: 7.5092; Orientation: 0.0340; Line Search: 5.0098
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/6821bbd1-d4be-467d-936c-55bbfb29f6ad.jpg)
    
    Adding measurement 7b763b02 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=3.6896701510995626;dx=-2.6675619819549045E-4
    New Minimum: 3.6896701510995626 > 3.6068279759492725
    END: th(240.0)=3.6068279759492725; dx=-2.3457113684188807E-4 evalInputDelta=

...skipping 1076 bytes...

    90386677
    Fitness changed from 3.6068279759492725 to 3.4452660230454057
    Iteration 4 complete. Error: 3.4452660230454057 Total: 11.6762; Orientation: 0.9147; Line Search: 7.4609
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/ad2ea408-b601-4bdd-9b70-597bc434a5bf.jpg)
    
    Adding measurement 25058500 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.405e+01, gradient 1.298e-02, dot -0.917; [758935ec-d0e7-4ef6-b9e8-e6d9e172869f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.70516822906211, 3.6896701510995626, 3.6068279759492725, 3.4452660230454057
    LBFGS Accumulation History: 3 points
    Removed measurement 3cbf06cc to history. Total: 4
    th(0)=3.4452660230454057;dx=-1.685754246027794E-4
    New Minimum: 3.4452660230454057 > 3.279697786550969
    END: th(2227.962640134134)=3.279697786550969; dx=-6.53305338867989E-5 evalInputDelta=0.16556823649443686
    Fitness changed from 3.4452660230454057 to 3.279697786550969
    Iteration 5 complete. Error: 3.279697786550969 Total: 8.1058; Orientation: 0.9269; Line Search: 4.7334
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/246350f5-0a35-4eb8-877f-8b40b5db3054.jpg)
    
    Adding measurement 565d393c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.325e+01, gradient 8.108e-03, dot -0.942; [758935ec-d0e7-4ef6-b9e8-e6d9e172869f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.6896701510995626, 3.6068279759492725, 3.4452660230454057, 3.279697786550969
    LBFGS Accumulation History: 3 points
    Removed measurement 7b763b02 to history. Total: 4
    th(0)=3.279697786550969;dx=-6.574426273985717E-5
    New Minimum: 3.279697786550969 > 3.1657734415493906
    END: th(4800.0)=3.1657734415493906; dx=-2.396477426858986E-5 evalInputDelta=0.11392434500157833
    Fitness changed from 3.279697786550969 to 3.1657734415493906
    Iteration 6 complete. Error: 3.1657734415493906 Total: 8.3847; Orientation: 0.9137; Line Search: 5.0128
    Final threshold in iteration 7: 3.1657734415493906 (> -Infinity) after 62.843s (< 720.000s)
    

Returns:

    3.1657734415493906