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 520.36 seconds (9.180 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: 608363513164800
    Reset training subject: 608374480056300
    Adding measurement 731990f0 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=10.279979944229126;dx=-1.1689604634177884E-6
    New Minimum: 10.279979944229126 > 10.279976189136505
    WOLFE (weak): th(2.154434690031884)=10.279976189136505; dx=-1.1666737273260343E-6 evalInputDelta=3.7550926208496094E-6
    New Minimum: 10.279976189136505 > 10.279972717165947
    WOLFE (weak): th(4.308869380063768)=10.279972717165947; dx=-1.1664735345639716E-6 evalInputDelta=7.227063179016113E-6
    New Minimum: 10.279972717165947 > 10.279958210885525
    WOLFE (weak): th(12.926608140191302)=10.279958210885525; dx=-1.1666656630326295E-6 evalInputDelta=2.1733343601226807E-5
    New Minimum: 10.279958210885525 > 10.279893323779106
    WOLFE (weak): th(51.70643256076521)=10.279893323779106; dx=-1.166545102329772E-6 evalInputDelta=8.662045001983643E-5
    New Minimum: 10.279893323779106 > 10.279545985162258
    WOLFE (weak): th(258.53216280382605)=10.279545985162258; dx=-1.1662116988306143E-6 evalInputDelta=4.3395906686782837E-4
    New Minimum: 10.279545985162258 > 10.277375504374504
    WOLFE (weak): th(1551.1929768229563)=10.277375504374504; dx=-1.1659868817450736E-6 evalInputDelta=0.002604439854621887
    New Minimum: 10.277375504374504 > 10.261761292815208
    WOLFE (weak): th(10858.350837760694)=10.261761292815208; dx=-1.1645160082082942E-6 evalInputDelta=0.01821865141391754
    New Minimum: 10.261761292815208 > 10.135222397744656
    WOLFE (weak): th(86866.80670208555)=10.135222397744656; dx=-1.1445529983278598E-6 evalInputDelta=0.14475754648447037
    New Minimum: 10.135222397744656 > 9.121420577168465
    END: th(781801.26031877)=9.121420577168465; dx=-8.674990685480762E-7 evalInputDelta=1.1585593670606613
    Fitness changed from 10.279979944229126 to 9.121420577168465
    Iteration 1 complete. Error: 9.121420577168465 Total: 146.0743; Orientation: 0.0270; Line Search: 112.8748
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/1

...skipping 6041 bytes...

    -04, dot -0.415; [5c307521-8295-4e44-ac03-4d90bcb55343 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.4307471215724945, 7.603167325258255, 9.121420577168465, 10.279979944229126
    LBFGS Accumulation History: 3 points
    Removed measurement 1299f229 to history. Total: 3
    th(0)=0.4307471215724945;dx=-4.984503851523975E-8
    New Minimum: 0.4307471215724945 > 0.21253572404384613
    WOLF (strong): th(1.5120000000000002E7)=0.21253572404384613; dx=9.455030541459497E-9 evalInputDelta=0.21821139752864838
    New Minimum: 0.21253572404384613 > 0.14434099197387695
    END: th(7560000.000000001)=0.14434099197387695; dx=-9.494444175456848E-9 evalInputDelta=0.28640612959861755
    Fitness changed from 0.4307471215724945 to 0.14434099197387695
    Iteration 9 complete. Error: 0.14434099197387695 Total: 45.6602; Orientation: 0.3856; Line Search: 33.2493
    Adding measurement 40a3cd0d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.334e+03, gradient 2.055e-04, dot -0.437; [5c307521-8295-4e44-ac03-4d90bcb55343 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.14434099197387695, 7.603167325258255, 9.121420577168465, 10.279979944229126
    LBFGS Accumulation History: 3 points
    Removed measurement 40a3cd0d to history. Total: 3
    th(0)=0.14434099197387695;dx=-4.2208550160639666E-8
    New Minimum: 0.14434099197387695 > 0.01037105917930603
    WOLF (strong): th(1.6287526256641043E7)=0.01037105917930603; dx=4.19647946289302E-9 evalInputDelta=0.13396993279457092
    New Minimum: 0.01037105917930603 > -0.06500455737113953
    END: th(8143763.128320522)=-0.06500455737113953; dx=-3.3364331857428845E-9 evalInputDelta=0.20934554934501648
    Fitness changed from 0.14434099197387695 to -0.06500455737113953
    Iteration 10 complete. Error: -0.06500455737113953 Total: 44.9630; Orientation: 0.3837; Line Search: 33.7669
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/ca6be5b8-d76a-41bf-b1c8-5d61905288b6.jpg)
    
    Final threshold in iteration 11: -0.06500455737113953 (> -Infinity) after 520.354s (< 3600.000s)
    

Returns:

    -0.06500455737113953