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:75 executed in 339.98 seconds (1.916 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: 736474903779900
    Reset training subject: 736482416763300
    Adding measurement 70b33256 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=2.80671613663435;dx=-7.811102011023428E-8
    New Minimum: 2.80671613663435 > 2.8067156448960304
    WOLFE (weak): th(2.154434690031884)=2.8067156448960304; dx=-7.448455262447839E-8 evalInputDelta=4.917383193969727E-7
    New Minimum: 2.8067156448960304 > 2.8067153431475163
    WOLFE (weak): th(4.308869380063768)=2.8067153431475163; dx=-7.444353424854348E-8 evalInputDelta=7.934868335723877E-7
    New Minimum: 2.8067153431475163 > 2.8067134879529476
    WOLFE (weak): th(12.926608140191302)=2.8067134879529476; dx=-7.445507016540862E-8 evalInputDelta=2.648681402206421E-6
    New Minimum: 2.8067134879529476 > 2.806705705821514
    WOLFE (weak): th(51.70643256076521)=2.806705705821514; dx=-7.44444553569417E-8 evalInputDelta=1.043081283569336E-5
    New Minimum: 2.806705705821514 > 2.8066637814044952
    WOLFE (weak): th(258.53216280382605)=2.8066637814044952; dx=-7.445685539351596E-8 evalInputDelta=5.235522985458374E-5
    New Minimum: 2.8066637814044952 > 2.806401811540127
    WOLFE (weak): th(1551.1929768229563)=2.806401811540127; dx=-7.446376031734598E-8 evalInputDelta=3.1432509422302246E-4
    New Minimum: 2.806401811540127 > 2.804516773670912
    WOLFE (weak): th(10858.350837760694)=2.804516773670912; dx=-7.431816452581982E-8 evalInputDelta=0.002199362963438034
    New Minimum: 2.804516773670912 > 2.7891768366098404
    WOLFE (weak): th(86866.80670208555)=2.7891768366098404; dx=-7.396070919718706E-8 evalInputDelta=0.01753930002450943
    New Minimum: 2.7891768366098404 > 2.6551201194524765
    END: th(781801.26031877)=2.6551201194524765; dx=-6.802196871694085E-8 evalInputDelta=0.15159601718187332
    Fitness changed from 2.80671613663435 to 2.6551201194524765
    Iteration 1 complete. Error: 2.6551201194524765 Total: 98.2176; Orientation: 0.0061; Line Search: 75.8818
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/d9382837-b1b9-4702-a92f

...skipping 5668 bytes...

     Search: 14.7428
    Adding measurement c0c8f96 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.240e+03, gradient 1.131e-04, dot -0.707; [d74cf6f1-4cd2-4844-b4bd-23d8038794ee = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.3921831771731377, 1.2855271473526955, 0.992718655616045, 0.8211484588682652
    LBFGS Accumulation History: 3 points
    Removed measurement 3ccb12d to history. Total: 4
    th(0)=0.8211484588682652;dx=-1.2768737858155847E-8
    Armijo: th(3.0240000000000004E7)=0.8531201556324959; dx=-6.792567167975513E-11 evalInputDelta=-0.03197169676423073
    New Minimum: 0.8211484588682652 > 0.6801024079322815
    END: th(1.5120000000000002E7)=0.6801024079322815; dx=-3.2593592696817556E-9 evalInputDelta=0.14104605093598366
    Fitness changed from 0.8211484588682652 to 0.6801024079322815
    Iteration 9 complete. Error: 0.6801024079322815 Total: 30.3018; Orientation: 0.1993; Line Search: 22.4842
    Adding measurement 11399548 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.513e+03, gradient 1.098e-04, dot -0.689; [d74cf6f1-4cd2-4844-b4bd-23d8038794ee = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.2855271473526955, 0.992718655616045, 0.8211484588682652, 0.6801024079322815
    LBFGS Accumulation History: 3 points
    Removed measurement 32e5af53 to history. Total: 4
    th(0)=0.6801024079322815;dx=-1.2040098922645392E-8
    Armijo: th(3.2575052513282087E7)=0.774887427687645; dx=5.705748379606455E-10 evalInputDelta=-0.09478501975536346
    New Minimum: 0.6801024079322815 > 0.5636700764298439
    END: th(1.6287526256641043E7)=0.5636700764298439; dx=-2.2202533807470717E-9 evalInputDelta=0.11643233150243759
    Fitness changed from 0.6801024079322815 to 0.5636700764298439
    Iteration 10 complete. Error: 0.5636700764298439 Total: 30.3036; Orientation: 0.1936; Line Search: 22.7092
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/86201767-f5c0-4a90-9b81-8df5edbca875.jpg)
    
    Final threshold in iteration 11: 0.5636700764298439 (> -Infinity) after 339.981s (< 1800.000s)
    

Returns:

    0.5636700764298439