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 598.36 seconds (3.414 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: 17820534489603
    Reset training subject: 17832565406501
    Adding measurement 52c37d58 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=6.71073754131794;dx=-1.2499622437216774E-6
    New Minimum: 6.71073754131794 > 6.710728831589222
    WOLFE (weak): th(2.154434690031884)=6.710728831589222; dx=-1.1834072930146489E-6 evalInputDelta=8.709728717803955E-6
    New Minimum: 6.710728831589222 > 6.710720017552376
    WOLFE (weak): th(4.308869380063768)=6.710720017552376; dx=-1.2015780879645877E-6 evalInputDelta=1.7523765563964844E-5
    New Minimum: 6.710720017552376 > 6.7106854766607285
    WOLFE (weak): th(12.926608140191302)=6.7106854766607285; dx=-1.236415803760033E-6 evalInputDelta=5.206465721130371E-5
    New Minimum: 6.7106854766607285 > 6.71052873134613
    WOLFE (weak): th(51.70643256076521)=6.71052873134613; dx=-1.1583215266572776E-6 evalInputDelta=2.088099718093872E-4
    New Minimum: 6.71052873134613 > 6.709697216749191
    WOLFE (weak): th(258.53216280382605)=6.709697216749191; dx=-1.2332369613806846E-6 evalInputDelta=0.0010403245687484741
    New Minimum: 6.709697216749191 > 6.704499080777168
    WOLFE (weak): th(1551.1929768229563)=6.704499080777168; dx=-1.2422987547925718E-6 evalInputDelta=0.006238460540771484
    New Minimum: 6.704499080777168 > 6.665942497551441
    WOLFE (weak): th(10858.350837760694)=6.665942497551441; dx=-1.2362437316433571E-6 evalInputDelta=0.044795043766498566
    New Minimum: 6.665942497551441 > 6.3637717589735985
    WOLFE (weak): th(86866.80670208555)=6.3637717589735985; dx=-1.1541351259993857E-6 evalInputDelta=0.3469657823443413
    New Minimum: 6.3637717589735985 > 4.747414201498032
    END: th(781801.26031877)=4.747414201498032; dx=-3.3131454986769066E-7 evalInputDelta=1.9633233398199081
    Fitness changed from 6.71073754131794 to 4.747414201498032
    Iteration 1 complete. Error: 4.747414201498032 Total: 157.7334; Orientation: 0.0085; Line Search: 120.9986
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/a1b6c185-fd23-470b-a2d5-a872f7b0f534.jpg)
    
    Adding measur

...skipping 6083 bytes...

    : LBFGS Orientation magnitude: 2.150e+03, gradient 2.842e-04, dot -0.629; [6563e898-c8a6-40bf-b520-86246a6ae66c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.641073152422905, 3.2314508110284805, 4.747414201498032, 6.71073754131794
    LBFGS Accumulation History: 3 points
    Removed measurement 5207d1be to history. Total: 3
    th(0)=0.641073152422905;dx=-7.693052441231868E-8
    New Minimum: 0.641073152422905 > 0.4073836952447891
    END: th(2520000.0000000005)=0.4073836952447891; dx=-2.186712008862608E-8 evalInputDelta=0.23368945717811584
    Fitness changed from 0.641073152422905 to 0.4073836952447891
    Iteration 9 complete. Error: 0.4073836952447891 Total: 36.0889; Orientation: 0.2820; Line Search: 23.9772
    Adding measurement 625f84e2 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.248e+03, gradient 3.573e-04, dot -0.468; [6563e898-c8a6-40bf-b520-86246a6ae66c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.4073836952447891, 3.2314508110284805, 4.747414201498032, 6.71073754131794
    LBFGS Accumulation History: 3 points
    Removed measurement 625f84e2 to history. Total: 3
    th(0)=0.4073836952447891;dx=-1.2341185449483238E-7
    Armijo: th(5429175.418880348)=1.4048681855201721; dx=6.602929163416805E-8 evalInputDelta=-0.997484490275383
    Armijo: th(2714587.709440174)=0.6370468437671661; dx=7.399580684291219E-8 evalInputDelta=-0.22966314852237701
    New Minimum: 0.4073836952447891 > 0.26999321579933167
    WOLF (strong): th(904862.5698133913)=0.26999321579933167; dx=6.523503237939606E-9 evalInputDelta=0.13739047944545746
    END: th(226215.64245334783)=0.33673328161239624; dx=-8.800973754075195E-8 evalInputDelta=0.07065041363239288
    Fitness changed from 0.4073836952447891 to 0.26999321579933167
    Iteration 10 complete. Error: 0.26999321579933167 Total: 72.7456; Orientation: 0.2161; Line Search: 60.2643
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/6179a621-9392-4179-90e0-648adb057dde.jpg)
    
    Final threshold in iteration 11: 0.26999321579933167 (> -Infinity) after 598.362s (< 1800.000s)
    

Returns:

    0.26999321579933167