Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:75 executed in 1059.90 seconds (8.272 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: 994313780436200
    Reset training subject: 994322668559200
    Adding measurement 7268ea42 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.4510698741062145;dx=-3.187984276349719E-7
    New Minimum: 3.4510698741062145 > 3.451069151305614
    WOLFE (weak): th(2.154434690031884)=3.451069151305614; dx=-3.187652660505637E-7 evalInputDelta=7.228006002613085E-7
    New Minimum: 3.451069151305614 > 3.451068476980929
    WOLFE (weak): th(4.308869380063768)=3.451068476980929; dx=-3.188541638579902E-7 evalInputDelta=1.3971252856848082E-6
    New Minimum: 3.451068476980929 > 3.4510650866839105
    WOLFE (weak): th(12.926608140191302)=3.4510650866839105; dx=-3.1876624426709524E-7 evalInputDelta=4.7874223039201524E-6
    New Minimum: 3.4510650866839105 > 3.451049782059977
    WOLFE (weak): th(51.70643256076521)=3.451049782059977; dx=-3.1870011137874194E-7 evalInputDelta=2.0092046237429884E-5
    New Minimum: 3.451049782059977 > 3.45096992428694
    WOLFE (weak): th(258.53216280382605)=3.45096992428694; dx=-3.187763251975281E-7 evalInputDelta=9.994981927441415E-5
    New Minimum: 3.45096992428694 > 3.4504697580523365
    WOLFE (weak): th(1551.1929768229563)=3.4504697580523365; dx=-3.1840841869403983E-7 evalInputDelta=6.00116053877997E-4
    New Minimum: 3.4504697580523365 > 3.446879082099996
    WOLFE (weak): th(10858.350837760694)=3.446879082099996; dx=-3.1694126446895996E-7 evalInputDelta=0.004190792006218302
    New Minimum: 3.446879082099996 > 3.4183366059707065
    WOLFE (weak): th(86866.80670208555)=3.4183366059707065; dx=-3.025146594101638E-7 evalInputDelta=0.03273326813550792
    New Minimum: 3.4183366059707065 > 3.22627046549004
    END: th(781801.26031877)=3.22627046549004; dx=-1.799969189931173E-7 evalInputDelta=0.22479940861617465
    Fitness changed from 3.4510698741062145 to 3.22627046549004
    Iteration 1 complete. Error: 3.22627046549004 Total: 109.1606; Orientation: 0.0128; Line Search: 83.6970
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/8d814af3-6d0d-4216-8edc-001

...skipping 24367 bytes...

    tion: 0.2875; Line Search: 16.6088
    Adding measurement 4302e504 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.295e+03, gradient 1.351e-04, dot -0.750; [228fb81a-7688-4b39-9b90-bcfca6b53d54 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.022502210499921, 2.0117808809925806, 1.9847355238254702, 1.97043572498968
    LBFGS Accumulation History: 3 points
    Removed measurement 26807d9b to history. Total: 4
    th(0)=1.97043572498968;dx=-1.8139484422764295E-8
    Armijo: th(5875853.919865721)=1.993935335108484; dx=7.252356597992414E-10 evalInputDelta=-0.023499610118804082
    New Minimum: 1.97043572498968 > 1.9576260490960888
    END: th(2937926.9599328605)=1.9576260490960888; dx=-5.947801699990058E-9 evalInputDelta=0.012809675893591166
    Fitness changed from 1.97043572498968 to 1.9576260490960888
    Iteration 29 complete. Error: 1.9576260490960888 Total: 33.6929; Orientation: 0.2597; Line Search: 24.9155
    Adding measurement 4db5ed2e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.252e+02, gradient 1.495e-04, dot -0.643; [228fb81a-7688-4b39-9b90-bcfca6b53d54 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.0117808809925806, 1.9847355238254702, 1.97043572498968, 1.9576260490960888
    LBFGS Accumulation History: 3 points
    Removed measurement 2205a3cd to history. Total: 4
    th(0)=1.9576260490960888;dx=-2.2269195506932313E-8
    Armijo: th(6329571.759259267)=2.000116800833845; dx=3.33623545055194E-9 evalInputDelta=-0.04249075173775596
    New Minimum: 1.9576260490960888 > 1.9497580742663723
    END: th(3164785.8796296334)=1.9497580742663723; dx=-4.549875855013308E-9 evalInputDelta=0.007867974829716573
    Fitness changed from 1.9576260490960888 to 1.9497580742663723
    Iteration 30 complete. Error: 1.9497580742663723 Total: 33.5983; Orientation: 0.2668; Line Search: 25.1991
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/cc7b2ce2-f517-4c82-adb1-d20f49b79dd7.jpg)
    
    Final threshold in iteration 31: 1.9497580742663723 (> -Infinity) after 1059.897s (< 3600.000s)
    

Returns:

    1.9497580742663723