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 799.21 seconds (6.207 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: 941010140813800
    Reset training subject: 941040866603800
    Adding measurement 1e4ee451 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=4.426299098879099;dx=-2.210654463632045E-5
    New Minimum: 4.426299098879099 > 4.426292039453983
    WOLFE (weak): th(2.154434690031884)=4.426292039453983; dx=-2.2105728298978914E-5 evalInputDelta=7.059425115585327E-6
    New Minimum: 4.426292039453983 > 4.426284976303577
    WOLFE (weak): th(4.308869380063768)=4.426284976303577; dx=-2.2106107856217103E-5 evalInputDelta=1.4122575521469116E-5
    New Minimum: 4.426284976303577 > 4.426258146762848
    WOLFE (weak): th(12.926608140191302)=4.426258146762848; dx=-2.213605029225898E-5 evalInputDelta=4.095211625099182E-5
    New Minimum: 4.426258146762848 > 4.426135782152414
    WOLFE (weak): th(51.70643256076521)=4.426135782152414; dx=-2.213239758253236E-5 evalInputDelta=1.633167266845703E-4
    New Minimum: 4.426135782152414 > 4.425484988838434
    WOLFE (weak): th(258.53216280382605)=4.425484988838434; dx=-2.2017057088502734E-5 evalInputDelta=8.141100406646729E-4
    New Minimum: 4.425484988838434 > 4.421183280646801
    WOLFE (weak): th(1551.1929768229563)=4.421183280646801; dx=-2.1591185824792583E-5 evalInputDelta=0.005115818232297897
    New Minimum: 4.421183280646801 > 4.397502230480313
    END: th(10858.350837760694)=4.397502230480313; dx=-1.912129438178934E-5 evalInputDelta=0.02879686839878559
    Fitness changed from 4.426299098879099 to 4.397502230480313
    Iteration 1 complete. Error: 4.397502230480313 Total: 337.7740; Orientation: 0.0074; Line Search: 245.8257
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/a00e557f-5549-408a-b687-61309da56275.jpg)
    
    Adding measurement 21aa9cdb to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=4.397502230480313;dx=-2.0016902631765236E-5
    New Minimum: 4.397502230480313 > 4.366915246471763
    END: th(23393.607721408407)=4.366915246471763; dx=-1.5437943457670314E-5 evalInputDelta=0.030586984008550644
    Fitness changed from 4

...skipping 1001 bytes...

    1.000e+00]
    Orientation rejected. Popping history element from 4.426299098879099, 4.397502230480313, 4.366915246471763, 4.319889988750219
    LBFGS Accumulation History: 3 points
    Removed measurement 1e4ee451 to history. Total: 4
    th(0)=4.319889988750219;dx=-1.713710582844958E-5
    Armijo: th(108583.50837760697)=4.407779388129711; dx=-5.6118859440365396E-6 evalInputDelta=-0.0878893993794918
    Armijo: th(54291.75418880348)=4.320698499679565; dx=-9.979870214799157E-6 evalInputDelta=-8.085109293460846E-4
    New Minimum: 4.319889988750219 > 4.303785499185324
    END: th(18097.251396267828)=4.303785499185324; dx=-1.3905427409414513E-5 evalInputDelta=0.01610448956489563
    Fitness changed from 4.319889988750219 to 4.303785499185324
    Iteration 4 complete. Error: 4.303785499185324 Total: 152.6986; Orientation: 0.2318; Line Search: 122.4810
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/832e7efc-403b-4954-aace-8ed3f870f36a.jpg)
    
    Adding measurement 279b7dde to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.751e+02, gradient 3.816e-03, dot -0.961; [35022a26-3a77-451b-9827-416bf6844c2e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 4.397502230480313, 4.366915246471763, 4.319889988750219, 4.303785499185324
    LBFGS Accumulation History: 3 points
    Removed measurement 21aa9cdb to history. Total: 4
    th(0)=4.303785499185324;dx=-1.4558527239367154E-5
    Armijo: th(38989.346202347355)=4.309792742133141; dx=-1.0316982563963674E-5 evalInputDelta=-0.006007242947816849
    New Minimum: 4.303785499185324 > 4.3019152749329805
    END: th(19494.673101173677)=4.3019152749329805; dx=-1.2574596249840164E-5 evalInputDelta=0.0018702242523431778
    Fitness changed from 4.303785499185324 to 4.3019152749329805
    Iteration 5 complete. Error: 4.3019152749329805 Total: 123.4327; Orientation: 0.2350; Line Search: 92.4939
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/7d6dccd7-e2ae-4866-9045-ef4ccdc2d5e7.jpg)
    
    Final threshold in iteration 5: 4.3019152749329805 (> -Infinity) after 799.208s (< 720.000s)
    

Returns:

    4.3019152749329805