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

Code from BasicOptimizer.scala:75 executed in 200.23 seconds (5.267 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: 1328216524052300
    Reset training subject: 1328219020773700
    Adding measurement 4cffcc61 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=19.545715875923634;dx=-6.89180795929532E-4
    New Minimum: 19.545715875923634 > 19.544011812657118
    WOLFE (weak): th(2.154434690031884)=19.544011812657118; dx=-6.491717475579957E-4 evalInputDelta=0.0017040632665157318
    New Minimum: 19.544011812657118 > 19.542429599910975
    END: th(4.308869380063768)=19.542429599910975; dx=-6.161323954766487E-4 evalInputDelta=0.003286276012659073
    Fitness changed from 19.545715875923634 to 19.542429599910975
    Iteration 1 complete. Error: 19.542429599910975 Total: 14.8340; Orientation: 0.0136; Line Search: 7.3585
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/17ff7fcd-04a0-415b-a089-515380d012f1.jpg)
    
    Adding measurement 6d229b1c to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=19.542429599910975;dx=-6.047382712859163E-4
    New Minimum: 19.542429599910975 > 19.52782966196537
    WOLFE (weak): th(9.283177667225559)=19.52782966196537; dx=-6.058878001080878E-4 evalInputDelta=0.014599937945604324
    New Minimum: 19.52782966196537 > 19.52176327072084
    WOLFE (weak): th(18.566355334451117)=19.52176327072084; dx=-6.088007005849564E-4 evalInputDelta=0.020666329190135002
    New Minimum: 19.52176327072084 > 19.49597786180675
    WOLFE (weak): th(55.69906600335335)=19.49597786180675; dx=-6.154785538049017E-4 evalInputDelta=0.046451738104224205
    New Minimum: 19.49597786180675 > 19.38363211043179
    WOLFE (weak): th(222.7962640134134)=19.38363211043179; dx=-6.541775936127102E-4 evalInputDelta=0.15879748947918415
    New Minimum: 19.38363211043179 > 18.7502582333982
    WOLFE (weak): th(1113.981320067067)=18.7502582333982; dx=-5.782719940510413E-4 evalInputDelta=0.7921713665127754
    New Minimum: 18.7502582333982 > 16.149669211357832
    END: th(6683.8879204024015)=16.149669211357832; dx=-3.316609759296637E-4 evalInputDelta=3.3927603885531425
    Fitness changed from 19.54

...skipping 14574 bytes...

    agnitude: 6.635e+02, gradient 7.427e-04, dot -0.715; [93696c74-f08c-4028-bf02-3f13cfe6fd47 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.726970762014389, 1.6252052038908005, 1.5246430933475494, 1.4254040718078613
    LBFGS Accumulation History: 3 points
    Removed measurement 5ba90d8a to history. Total: 4
    th(0)=1.4254040718078613;dx=-5.51552814239234E-7
    Armijo: th(673260.840634964)=1.4476853013038635; dx=2.8334553373360354E-7 evalInputDelta=-0.022281229496002197
    New Minimum: 1.4254040718078613 > 1.365061178803444
    WOLF (strong): th(336630.420317482)=1.365061178803444; dx=1.8538838736530928E-8 evalInputDelta=0.06034289300441742
    END: th(112210.14010582735)=1.3799749910831451; dx=-3.0086377755290224E-7 evalInputDelta=0.045429080724716187
    Fitness changed from 1.4254040718078613 to 1.365061178803444
    Iteration 19 complete. Error: 1.365061178803444 Total: 12.1614; Orientation: 0.0904; Line Search: 9.7492
    Adding measurement 5ac53c06 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.634e+02, gradient 9.650e-04, dot -0.569; [93696c74-f08c-4028-bf02-3f13cfe6fd47 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.6252052038908005, 1.5246430933475494, 1.4254040718078613, 1.365061178803444
    LBFGS Accumulation History: 3 points
    Removed measurement 16f0ec18 to history. Total: 4
    th(0)=1.365061178803444;dx=-9.312042201322917E-7
    New Minimum: 1.365061178803444 > 1.282762736082077
    WOLF (strong): th(241749.4184173324)=1.282762736082077; dx=2.2686234261560537E-7 evalInputDelta=0.08229844272136688
    END: th(120874.7092086662)=1.285437136888504; dx=-2.9611709420927206E-7 evalInputDelta=0.07962404191493988
    Fitness changed from 1.365061178803444 to 1.282762736082077
    Iteration 20 complete. Error: 1.282762736082077 Total: 9.4012; Orientation: 0.0888; Line Search: 6.9826
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/826cd488-97db-4465-aa29-a40bc87f6810.jpg)
    
    Final threshold in iteration 21: 1.282762736082077 (> -Infinity) after 200.217s (< 3600.000s)
    

Returns:

    1.282762736082077