Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Code from BasicOptimizer.scala:75 executed in 22.66 seconds (0.000 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: 924321124149600
    Reset training subject: 924322044767800
    Adding measurement 459c1cf9 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.1675066500902176;dx=-1.5085000909301487E-5
    New Minimum: 3.1675066500902176 > 3.1674837544560432
    WOLFE (weak): th(2.154434690031884)=3.1674837544560432; dx=-1.508100816684381E-5 evalInputDelta=2.2895634174346924E-5
    New Minimum: 3.1674837544560432 > 3.1674613431096077
    WOLFE (weak): th(4.308869380063768)=3.1674613431096077; dx=-1.5078828658859123E-5 evalInputDelta=4.53069806098938E-5
    New Minimum: 3.1674613431096077 > 3.16737000644207
    WOLFE (weak): th(12.926608140191302)=3.16737000644207; dx=-1.506880403616783E-5 evalInputDelta=1.36643648147583E-4
    New Minimum: 3.16737000644207 > 3.166959624737501
    WOLFE (weak): th(51.70643256076521)=3.166959624737501; dx=-1.50373298643146E-5 evalInputDelta=5.470253527164459E-4
    New Minimum: 3.166959624737501 > 3.164778418838978
    WOLFE (weak): th(258.53216280382605)=3.164778418838978; dx=-1.4765379139940107E-5 evalInputDelta=0.0027282312512397766
    New Minimum: 3.164778418838978 > 3.151924081146717
    END: th(1551.1929768229563)=3.151924081146717; dx=-1.330558595995709E-5 evalInputDelta=0.015582568943500519
    Fitness changed from 3.1675066500902176 to 3.151924081146717
    Iteration 1 complete. Error: 3.151924081146717 Total: 8.8894; Orientation: 0.0043; Line Search: 6.1927
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/07653030-8bfe-4930-a272-35626e525c0c.jpg)
    
    Adding measurement 647a6378 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=3.151924081146717;dx=-1.4394023556650052E-5
    New Minimum: 3.151924081146717 > 3.1274996884167194
    END: th(3341.943960201201)=3.1274996884167194; dx=-1.165721740389219E-5 evalInputDelta=0.024424392729997635
    Fitness changed from 3.151924081146717 to 3.1274996884167194
    Iteration 2 complete. Error: 3.1274996884167194 Total: 2.6986; Orientation: 0.0041; Line Search: 1.8057
    <a id="p-5"></a>Iteration

...skipping 1284 bytes...

    tness changed from 3.0820361748337746 to 3.0153418071568012
    Iteration 4 complete. Error: 3.0153418071568012 Total: 2.6696; Orientation: 0.1268; Line Search: 1.6194
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/8296d01d-68b4-4c32-a8d8-4605956be4f3.jpg)
    
    Adding measurement 318d07c6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.186e+02, gradient 3.411e-03, dot -0.670; [97b02825-c424-4a71-9344-7c8f8422db75 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.151924081146717, 3.1274996884167194, 3.0820361748337746, 3.0153418071568012
    LBFGS Accumulation History: 3 points
    Removed measurement 647a6378 to history. Total: 4
    th(0)=3.0153418071568012;dx=-1.1634197536453102E-5
    New Minimum: 3.0153418071568012 > 2.964176557958126
    END: th(33419.43960201202)=2.964176557958126; dx=-2.1760395049758863E-6 evalInputDelta=0.051165249198675156
    Fitness changed from 3.0153418071568012 to 2.964176557958126
    Iteration 5 complete. Error: 2.964176557958126 Total: 2.7222; Orientation: 0.1104; Line Search: 1.7003
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/89a3026d-602c-432e-835e-2d0d359ab498.jpg)
    
    Adding measurement 6ce0c778 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.291e+02, gradient 3.227e-03, dot -0.703; [97b02825-c424-4a71-9344-7c8f8422db75 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.1274996884167194, 3.0820361748337746, 3.0153418071568012, 2.964176557958126
    LBFGS Accumulation History: 3 points
    Removed measurement 7714328b to history. Total: 4
    th(0)=2.964176557958126;dx=-1.0413405906628237E-5
    New Minimum: 2.964176557958126 > 2.886828102171421
    END: th(72000.00000000003)=2.886828102171421; dx=-1.2292994479326987E-6 evalInputDelta=0.07734845578670502
    Fitness changed from 2.964176557958126 to 2.886828102171421
    Iteration 6 complete. Error: 2.886828102171421 Total: 3.0018; Orientation: 0.1587; Line Search: 1.8827
    Final threshold in iteration 7: 2.886828102171421 (> -Infinity) after 22.659s (< 720.000s)
    

Returns:

    2.886828102171421