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 2458.38 seconds (25.967 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: 1083379156960700
    Reset training subject: 1083399223721700
    Adding measurement 47d32e33 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.8698871507164823;dx=-3.958609755783791E-7
    New Minimum: 1.8698871507164823 > 1.869886562120615
    WOLFE (weak): th(2.154434690031884)=1.869886562120615; dx=-3.936183795132254E-7 evalInputDelta=5.885958671569824E-7
    New Minimum: 1.869886562120615 > 1.869885414741311
    WOLFE (weak): th(4.308869380063768)=1.869885414741311; dx=-3.9361791903375905E-7 evalInputDelta=1.7359751711687466E-6
    New Minimum: 1.869885414741311 > 1.8698820098461941
    WOLFE (weak): th(12.926608140191302)=1.8698820098461941; dx=-3.9361778291130766E-7 evalInputDelta=5.140870288133925E-6
    New Minimum: 1.8698820098461941 > 1.8698659092628187
    WOLFE (weak): th(51.70643256076521)=1.8698659092628187; dx=-3.936219943918955E-7 evalInputDelta=2.1241453663556342E-5
    New Minimum: 1.8698659092628187 > 1.8697798035396578
    WOLFE (weak): th(258.53216280382605)=1.8697798035396578; dx=-3.936051350045793E-7 evalInputDelta=1.0734717682447936E-4
    New Minimum: 1.8697798035396578 > 1.8692435072296831
    WOLFE (weak): th(1551.1929768229563)=1.8692435072296831; dx=-3.9352472868874286E-7 evalInputDelta=6.436434867991281E-4
    New Minimum: 1.8692435072296831 > 1.8653851853548882
    WOLFE (weak): th(10858.350837760694)=1.8653851853548882; dx=-3.927879521611194E-7 evalInputDelta=0.004501965361594085
    New Minimum: 1.8653851853548882 > 1.834152253439787
    WOLFE (weak): th(86866.80670208555)=1.834152253439787; dx=-3.8667478866802933E-7 evalInputDelta=0.03573489727669532
    New Minimum: 1.834152253439787 > 1.572576638841476
    END: th(781801.26031877)=1.572576638841476; dx=-3.2608266291077137E-7 evalInputDelta=0.29731051187500634
    Fitness changed from 1.8698871507164823 to 1.572576638841476
    Iteration 1 complete. Error: 1.572576638841476 Total: 252.7991; Orientation: 0.0338; Line Search: 194.0702
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/7b5dbbc7-

...skipping 25184 bytes...

    BFGS Orientation magnitude: 1.540e+03, gradient 8.825e-05, dot -0.608; [4a0fa326-2383-4513-a3a2-46ec0780e84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.43657239816921467, -0.44362179260312784, -0.4476323568115408, -0.4516282839838437
    LBFGS Accumulation History: 3 points
    Removed measurement 5872376d to history. Total: 4
    th(0)=-0.4516282839838437;dx=-7.788599859897191E-9
    Armijo: th(1.7627561759597164E7)=-0.4142744788160795; dx=1.761634821187931E-9 evalInputDelta=-0.03735380516776421
    New Minimum: -0.4516282839838437 > -0.4536101678697815
    WOLF (strong): th(8813780.879798582)=-0.4536101678697815; dx=4.697901354570919E-10 evalInputDelta=0.001981883885937785
    New Minimum: -0.4536101678697815 > -0.4630743050187345
    END: th(2937926.9599328605)=-0.4630743050187345; dx=-4.2007105066870185E-9 evalInputDelta=0.011446021034890785
    Fitness changed from -0.4516282839838437 to -0.4630743050187345
    Iteration 29 complete. Error: -0.4630743050187345 Total: 98.2702; Orientation: 1.0356; Line Search: 78.1903
    Adding measurement 5710fca8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.359e+03, gradient 6.955e-05, dot -0.858; [4a0fa326-2383-4513-a3a2-46ec0780e84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.44362179260312784, -0.4476323568115408, -0.4516282839838437, -0.4630743050187345
    LBFGS Accumulation History: 3 points
    Removed measurement 15dba9f9 to history. Total: 4
    th(0)=-0.4630743050187345;dx=-4.83669207250493E-9
    New Minimum: -0.4630743050187345 > -0.469240274586209
    END: th(6329571.759259267)=-0.469240274586209; dx=-1.7716016811359E-9 evalInputDelta=0.006165969567474505
    Fitness changed from -0.4630743050187345 to -0.469240274586209
    Iteration 30 complete. Error: -0.469240274586209 Total: 59.4679; Orientation: 1.0444; Line Search: 39.6359
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/793aca6e-40e7-4326-96cd-7f6a8a13faa6.jpg)
    
    Final threshold in iteration 31: -0.469240274586209 (> -Infinity) after 2458.372s (< 3600.000s)
    

Returns:

    -0.469240274586209