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 277.79 seconds (3.919 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: 3058735079624
    Reset training subject: 3062089295237
    Adding measurement 5572c25b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=10.127149611711502;dx=-1.374293303815371E-6
    New Minimum: 10.127149611711502 > 10.127148009836674
    WOLFE (weak): th(2.154434690031884)=10.127148009836674; dx=-1.3742900960429905E-6 evalInputDelta=1.601874828338623E-6
    New Minimum: 10.127148009836674 > 10.127145774662495
    WOLFE (weak): th(4.308869380063768)=10.127145774662495; dx=-1.374286332786679E-6 evalInputDelta=3.8370490074157715E-6
    New Minimum: 10.127145774662495 > 10.127137780189514
    WOLFE (weak): th(12.926608140191302)=10.127137780189514; dx=-1.3742784392663744E-6 evalInputDelta=1.1831521987915039E-5
    New Minimum: 10.127137780189514 > 10.127102054655552
    WOLFE (weak): th(51.70643256076521)=10.127102054655552; dx=-1.3742488252119675E-6 evalInputDelta=4.7557055950164795E-5
    New Minimum: 10.127102054655552 > 10.126911737024784
    WOLFE (weak): th(258.53216280382605)=10.126911737024784; dx=-1.373885399626199E-6 evalInputDelta=2.3787468671798706E-4
    New Minimum: 10.126911737024784 > 10.125723011791706
    WOLFE (weak): th(1551.1929768229563)=10.125723011791706; dx=-1.37287798839926E-6 evalInputDelta=0.00142659991979599
    New Minimum: 10.125723011791706 > 10.117177188396454
    WOLFE (weak): th(10858.350837760694)=10.117177188396454; dx=-1.3674668630003234E-6 evalInputDelta=0.009972423315048218
    New Minimum: 10.117177188396454 > 10.048468112945557
    WOLFE (weak): th(86866.80670208555)=10.048468112945557; dx=-1.3189441167002825E-6 evalInputDelta=0.07868149876594543
    New Minimum: 10.048468112945557 > 9.526922106742859
    END: th(781801.26031877)=9.526922106742859; dx=-9.071342963588093E-7 evalInputDelta=0.6002275049686432
    Fitness changed from 10.127149611711502 to 9.526922106742859
    Iteration 1 complete. Error: 9.526922106742859 Total: 45.0483; Orientation: 0.0127; Line Search: 34.8615
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/ad577239-ce69-4f9d-b393-fb47cd0762b9

...skipping 9455 bytes...

    ; dx=-1.0676311233617426E-7 evalInputDelta=2.9802322387695312E-8
    Armijo: th(1.4559608978984912E-4)=4.136329725384712; dx=-1.0676311210045977E-7 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(1.4322422366545308E-4)=4.136329725384712; dx=-1.0676311225919665E-7 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(1.4203829060325507E-4)=4.136329725384712; dx=-1.0676311207532841E-7 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(1.4144532407215607E-4)=4.136329665780067; dx=-1.0676311229771855E-7 evalInputDelta=2.9802322387695312E-8
    Armijo: th(1.4174180733770556E-4)=4.136329725384712; dx=-1.0676311214745004E-7 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(1.4159356570493081E-4)=4.136329725384712; dx=-1.0676311221154468E-7 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(1.4151944488854343E-4)=4.136329725384712; dx=-1.0676311233194189E-7 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(1.4148238448034975E-4)=4.136329665780067; dx=-1.067631122153805E-7 evalInputDelta=2.9802322387695312E-8
    WOLFE (weak): th(1.415009146844466E-4)=4.136329665780067; dx=-1.0676311212376993E-7 evalInputDelta=2.9802322387695312E-8
    Armijo: th(1.41510179786495E-4)=4.136329725384712; dx=-1.0676311227364728E-7 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(1.415055472354708E-4)=4.136329725384712; dx=-1.0676311208625249E-7 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(1.415032309599587E-4)=4.136329725384712; dx=-1.0676311223209125E-7 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(1.4150207282220264E-4)=4.136329665780067; dx=-1.0676311198272325E-7 evalInputDelta=2.9802322387695312E-8
    mu ~= nu (1.4150207282220264E-4): th(9.341503505313628E-5)=4.136329665780067
    Fitness changed from 4.13632969558239 to 4.136329665780067
    Iteration 10 complete. Error: 4.136329665780067 Total: 127.7935; Orientation: 0.4087; Line Search: 122.9447
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/2bcf12d9-7cad-4fe6-9cb2-ceb1461b21c1.jpg)
    
    Final threshold in iteration 11: 4.136329665780067 (> -Infinity) after 277.787s (< 3600.000s)
    

Returns:

    4.136329665780067