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

Code from BasicOptimizer.scala:75 executed in 3804.23 seconds (29.450 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: 945938521317600
    Reset training subject: 945986877821400
    Adding measurement 1009e261 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=6.639749720692635;dx=-0.001396795591815807
    New Minimum: 6.639749720692635 > 6.637964829802513
    WOLFE (weak): th(2.154434690031884)=6.637964829802513; dx=-0.0013849412137760635 evalInputDelta=0.00178489089012146
    New Minimum: 6.637964829802513 > 6.6361975222826
    WOLFE (weak): th(4.308869380063768)=6.6361975222826; dx=-0.0013807022860216722 evalInputDelta=0.0035521984100341797
    New Minimum: 6.6361975222826 > 6.62921242415905
    WOLFE (weak): th(12.926608140191302)=6.62921242415905; dx=-0.0013589212551353227 evalInputDelta=0.010537296533584595
    New Minimum: 6.62921242415905 > 6.597537741065025
    WOLFE (weak): th(51.70643256076521)=6.597537741065025; dx=-0.0013545947360008674 evalInputDelta=0.04221197962760925
    New Minimum: 6.597537741065025 > 6.441207371652126
    END: th(258.53216280382605)=6.441207371652126; dx=-0.0012506446202206886 evalInputDelta=0.19854234904050827
    Fitness changed from 6.639749720692635 to 6.441207371652126
    Iteration 1 complete. Error: 6.441207371652126 Total: 435.4197; Orientation: 0.0647; Line Search: 290.4109
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/9a6d564d-8306-48e6-b5f1-e13a52a3efb7.jpg)
    
    Adding measurement 14d7c42f to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=6.441207371652126;dx=-0.0016875105209417166
    New Minimum: 6.441207371652126 > 6.0993126928806305
    END: th(556.9906600335335)=6.0993126928806305; dx=-8.181380651948368E-4 evalInputDelta=0.3418946787714958
    Fitness changed from 6.441207371652126 to 6.0993126928806305
    Iteration 2 complete. Error: 6.0993126928806305 Total: 145.2402; Orientation: 0.0634; Line Search: 97.1885
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/6b5c6996-b8ba-4c5c-b0cb-b4508060cf75.jpg)
    
    Adding measurement 37639cea to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=6.0

...skipping 13714 bytes...

    . Total: 3
    Rejected: LBFGS Orientation magnitude: 5.848e+01, gradient 4.445e-03, dot -0.705; [7d51fac0-4b48-449f-bbf6-a427ac63a5e5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.216215968132019, 3.1756809428334236, 3.1380035877227783, 3.1037645041942596
    LBFGS Accumulation History: 3 points
    Removed measurement 5ee00da8 to history. Total: 4
    th(0)=3.1037645041942596;dx=-1.9756116179350173E-5
    Armijo: th(8680.555555555564)=3.105837196111679; dx=1.1581095680454572E-5 evalInputDelta=-0.0020726919174194336
    New Minimum: 3.1037645041942596 > 3.0739668905735016
    END: th(4340.277777777782)=3.0739668905735016; dx=-1.4321173329854477E-7 evalInputDelta=0.029797613620758057
    Fitness changed from 3.1037645041942596 to 3.0739668905735016
    Iteration 18 complete. Error: 3.0739668905735016 Total: 194.5482; Orientation: 1.9168; Line Search: 144.6074
    Adding measurement 1bc5849d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.411e+01, gradient 5.265e-03, dot -0.605; [7d51fac0-4b48-449f-bbf6-a427ac63a5e5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.1756809428334236, 3.1380035877227783, 3.1037645041942596, 3.0739668905735016
    LBFGS Accumulation History: 3 points
    Removed measurement 741086ae to history. Total: 4
    th(0)=3.0739668905735016;dx=-2.7722572784452433E-5
    Armijo: th(9350.84500881895)=3.1404019445180893; dx=2.7888673680939333E-5 evalInputDelta=-0.06643505394458771
    New Minimum: 3.0739668905735016 > 3.055588334798813
    WOLF (strong): th(4675.422504409475)=3.055588334798813; dx=1.063028400207133E-5 evalInputDelta=0.01837855577468872
    New Minimum: 3.055588334798813 > 3.0497029423713684
    END: th(1558.4741681364915)=3.0497029423713684; dx=-1.0777547306913474E-5 evalInputDelta=0.02426394820213318
    Fitness changed from 3.0739668905735016 to 3.0497029423713684
    Iteration 19 complete. Error: 3.0497029423713684 Total: 244.4369; Orientation: 2.1193; Line Search: 194.2713
    Final threshold in iteration 19: 3.0497029423713684 (> -Infinity) after 3804.227s (< 3600.000s)
    

Returns:

    3.0497029423713684