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 137.20 seconds (2.467 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: 1148427747748200
    Reset training subject: 1148430087085000
    Adding measurement 65384249 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=10.646107057109475;dx=-5.196748827587577E-6
    New Minimum: 10.646107057109475 > 10.646082539111376
    WOLFE (weak): th(2.154434690031884)=10.646082539111376; dx=-5.203603489187058E-6 evalInputDelta=2.4517998099327087E-5
    New Minimum: 10.646082539111376 > 10.646058453246951
    WOLFE (weak): th(4.308869380063768)=10.646058453246951; dx=-5.206210433560427E-6 evalInputDelta=4.860386252403259E-5
    New Minimum: 10.646058453246951 > 10.645960878580809
    WOLFE (weak): th(12.926608140191302)=10.645960878580809; dx=-5.188997975607598E-6 evalInputDelta=1.4617852866649628E-4
    New Minimum: 10.645960878580809 > 10.645522553473711
    WOLFE (weak): th(51.70643256076521)=10.645522553473711; dx=-5.206348876214748E-6 evalInputDelta=5.84503635764122E-4
    New Minimum: 10.645522553473711 > 10.643182283267379
    WOLFE (weak): th(258.53216280382605)=10.643182283267379; dx=-5.203565296840718E-6 evalInputDelta=0.0029247738420963287
    New Minimum: 10.643182283267379 > 10.628538213670254
    WOLFE (weak): th(1551.1929768229563)=10.628538213670254; dx=-5.202408685223021E-6 evalInputDelta=0.017568843439221382
    New Minimum: 10.628538213670254 > 10.52279220148921
    WOLFE (weak): th(10858.350837760694)=10.52279220148921; dx=-5.184878527918124E-6 evalInputDelta=0.12331485562026501
    New Minimum: 10.52279220148921 > 9.714988328516483
    END: th(86866.80670208555)=9.714988328516483; dx=-4.164705772624672E-6 evalInputDelta=0.9311187285929918
    Fitness changed from 10.646107057109475 to 9.714988328516483
    Iteration 1 complete. Error: 9.714988328516483 Total: 26.9065; Orientation: 0.0156; Line Search: 19.6961
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/3385c4a4-46b6-42d8-ba8c-bb0989b23b71.jpg)
    
    Adding measurement 5e8f1db2 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=9.714988328516483;dx=-4.705511658668977E-6

...skipping 10215 bytes...

    itude: 2.012e+03, gradient 2.695e-04, dot -0.725; [c36c3eef-b1d3-4acd-a13d-260c03438826 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.6753024086356163, 1.4067761823534966, 1.2350964918732643, 1.036535818129778
    LBFGS Accumulation History: 3 points
    Removed measurement 3444ac8f to history. Total: 4
    th(0)=1.036535818129778;dx=-7.242370175594984E-8
    New Minimum: 1.036535818129778 > 0.8728169649839401
    WOLF (strong): th(4332149.578038597)=0.8728169649839401; dx=3.402922726262015E-9 evalInputDelta=0.16371885314583778
    New Minimum: 0.8728169649839401 > 0.8522736579179764
    END: th(2166074.7890192983)=0.8522736579179764; dx=-1.7891599060645653E-8 evalInputDelta=0.18426216021180153
    Fitness changed from 1.036535818129778 to 0.8522736579179764
    Iteration 14 complete. Error: 0.8522736579179764 Total: 8.7591; Orientation: 0.0388; Line Search: 6.6173
    Adding measurement 35f011cf to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.853e+03, gradient 2.731e-04, dot -0.694; [c36c3eef-b1d3-4acd-a13d-260c03438826 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.4067761823534966, 1.2350964918732643, 1.036535818129778, 0.8522736579179764
    LBFGS Accumulation History: 3 points
    Removed measurement 3b6f7ab3 to history. Total: 4
    th(0)=0.8522736579179764;dx=-7.434229739198067E-8
    New Minimum: 0.8522736579179764 > 0.8104100823402405
    WOLF (strong): th(4666666.66666667)=0.8104100823402405; dx=1.8038616283804964E-8 evalInputDelta=0.0418635755777359
    New Minimum: 0.8104100823402405 > 0.6763329692184925
    END: th(2333333.333333335)=0.6763329692184925; dx=-6.2813891346407905E-9 evalInputDelta=0.17594068869948387
    Fitness changed from 0.8522736579179764 to 0.6763329692184925
    Iteration 15 complete. Error: 0.6763329692184925 Total: 8.7076; Orientation: 0.0392; Line Search: 6.5743
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/0c1526ea-1499-42f6-a9be-73c0fb2b514c.jpg)
    
    Final threshold in iteration 16: 0.6763329692184925 (> -Infinity) after 137.179s (< 3600.000s)
    

Returns:

    0.6763329692184925