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 456.93 seconds (4.007 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: 3356193203926
    Reset training subject: 3367130109894
    Adding measurement 4171c5db to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=12.654104515910149;dx=-2.9462670372041803E-7
    New Minimum: 12.654104515910149 > 12.654103897511959
    WOLFE (weak): th(2.154434690031884)=12.654103897511959; dx=-3.2302216707756674E-7 evalInputDelta=6.183981895446777E-7
    New Minimum: 12.654103897511959 > 12.65410190820694
    WOLFE (weak): th(4.308869380063768)=12.65410190820694; dx=-2.961232366144538E-7 evalInputDelta=2.60770320892334E-6
    New Minimum: 12.65410190820694 > 12.654096245765686
    WOLFE (weak): th(12.926608140191302)=12.654096245765686; dx=-3.171830374458884E-7 evalInputDelta=8.27014446258545E-6
    New Minimum: 12.654096245765686 > 12.654068812727928
    WOLFE (weak): th(51.70643256076521)=12.654068812727928; dx=-2.6926495616783634E-7 evalInputDelta=3.5703182220458984E-5
    New Minimum: 12.654068812727928 > 12.653921946883202
    WOLFE (weak): th(258.53216280382605)=12.653921946883202; dx=-3.212148578384331E-7 evalInputDelta=1.8256902694702148E-4
    New Minimum: 12.653921946883202 > 12.653004042804241
    WOLFE (weak): th(1551.1929768229563)=12.653004042804241; dx=-2.7443586097282404E-7 evalInputDelta=0.0011004731059074402
    New Minimum: 12.653004042804241 > 12.646379917860031
    WOLFE (weak): th(10858.350837760694)=12.646379917860031; dx=-2.876783278005631E-7 evalInputDelta=0.007724598050117493
    New Minimum: 12.646379917860031 > 12.592275656759739
    WOLFE (weak): th(86866.80670208555)=12.592275656759739; dx=-2.897949501430614E-7 evalInputDelta=0.0618288591504097
    New Minimum: 12.592275656759739 > 12.062495663762093
    END: th(781801.26031877)=12.062495663762093; dx=-2.6337562338620946E-7 evalInputDelta=0.591608852148056
    Fitness changed from 12.654104515910149 to 12.062495663762093
    Iteration 1 complete. Error: 12.062495663762093 Total: 133.6382; Orientation: 0.0087; Line Search: 102.4826
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/c241a8dc-81a4-4dc1-8593-6b96b27c8f92

...skipping 5440 bytes...

    
    Adding measurement 76b28a86 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.866e+02, gradient 1.591e-04, dot -0.200; [98dc0498-a25c-410d-a6fb-062328d37bbb = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.9259531050920486, 11.12693478167057, 12.062495663762093, 12.654104515910149
    LBFGS Accumulation History: 3 points
    Removed measurement 76b28a86 to history. Total: 3
    th(0)=2.9259531050920486;dx=-2.332414187777585E-8
    Armijo: th(9.072000000000001E7)=5.675252966582775; dx=1.3315373803782089E-8 evalInputDelta=-2.7492998614907265
    New Minimum: 2.9259531050920486 > 2.602324090898037
    WOLF (strong): th(4.536000000000001E7)=2.602324090898037; dx=9.179428829446509E-10 evalInputDelta=0.3236290141940117
    New Minimum: 2.602324090898037 > 2.278385266661644
    END: th(1.5120000000000002E7)=2.278385266661644; dx=-1.1174740272900323E-8 evalInputDelta=0.6475678384304047
    Fitness changed from 2.9259531050920486 to 2.278385266661644
    Iteration 9 complete. Error: 2.278385266661644 Total: 51.7409; Orientation: 0.1671; Line Search: 41.7419
    Adding measurement daca9a5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.332e+03, gradient 1.301e-04, dot -0.175; [98dc0498-a25c-410d-a6fb-062328d37bbb = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.278385266661644, 11.12693478167057, 12.062495663762093, 12.654104515910149
    LBFGS Accumulation History: 3 points
    Removed measurement daca9a5 to history. Total: 3
    th(0)=2.278385266661644;dx=-1.4546604795044493E-8
    New Minimum: 2.278385266661644 > 1.8313651233911514
    END: th(3.2575052513282087E7)=1.8313651233911514; dx=-3.2536722187719966E-9 evalInputDelta=0.44702014327049255
    Fitness changed from 2.278385266661644 to 1.8313651233911514
    Iteration 10 complete. Error: 1.8313651233911514 Total: 30.8515; Orientation: 0.1773; Line Search: 20.4989
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/8b50e0d2-d2a6-4867-be37-f1d72fd42b99.jpg)
    
    Final threshold in iteration 11: 1.8313651233911514 (> -Infinity) after 456.928s (< 1800.000s)
    

Returns:

    1.8313651233911514