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 933.99 seconds (7.588 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: 1072118775085500
    Reset training subject: 1072126172297800
    Adding measurement 32c08610 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.8668073142571315;dx=-3.130691745931109E-7
    New Minimum: 0.8668073142571315 > 0.8668069155413483
    WOLFE (weak): th(2.154434690031884)=0.8668069155413483; dx=-3.081813841406358E-7 evalInputDelta=3.9871578327854706E-7
    New Minimum: 0.8668069155413483 > 0.8668062151867721
    WOLFE (weak): th(4.308869380063768)=0.8668062151867721; dx=-3.0818188397356707E-7 evalInputDelta=1.099070359389387E-6
    New Minimum: 0.8668062151867721 > 0.8668042292778793
    WOLFE (weak): th(12.926608140191302)=0.8668042292778793; dx=-3.0818046647993267E-7 evalInputDelta=3.0849792522769093E-6
    New Minimum: 0.8668042292778793 > 0.8667943227434838
    WOLFE (weak): th(51.70643256076521)=0.8667943227434838; dx=-3.081778113870334E-7 evalInputDelta=1.2991513647753195E-5
    New Minimum: 0.8667943227434838 > 0.8667427811525432
    WOLFE (weak): th(258.53216280382605)=0.8667427811525432; dx=-3.0816187171389185E-7 evalInputDelta=6.453310458831574E-5
    New Minimum: 0.8667427811525432 > 0.8664195530010452
    WOLFE (weak): th(1551.1929768229563)=0.8664195530010452; dx=-3.080189401758441E-7 evalInputDelta=3.877612560863053E-4
    New Minimum: 0.8664195530010452 > 0.8640968823376212
    WOLFE (weak): th(10858.350837760694)=0.8640968823376212; dx=-3.0713903293750085E-7 evalInputDelta=0.00271043191951037
    New Minimum: 0.8640968823376212 > 0.8454368836233406
    WOLFE (weak): th(86866.80670208555)=0.8454368836233406; dx=-3.00447964376997E-7 evalInputDelta=0.02137043063379096
    New Minimum: 0.8454368836233406 > 0.6999028585025859
    END: th(781801.26031877)=0.6999028585025859; dx=-2.388332677739932E-7 evalInputDelta=0.1669044557545456
    Fitness changed from 0.8668073142571315 to 0.6999028585025859
    Iteration 1 complete. Error: 0.6999028585025859 Total: 95.1624; Orientation: 0.0131; Line Search: 72.4746
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/8e

...skipping 24805 bytes...

    ding measurement 3fe11091 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.057e+03, gradient 1.486e-04, dot -0.798; [bf29958e-f0db-42dd-85c4-5e7d69e168b3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.3209780323038922, -0.3390894122564658, -0.3488129122758088, -0.356541092065382
    LBFGS Accumulation History: 3 points
    Removed measurement 1d4c6e32 to history. Total: 4
    th(0)=-0.356541092065382;dx=-2.2096610700144405E-8
    Armijo: th(8813780.87979858)=-0.3294503279786878; dx=-7.801078770844248E-9 evalInputDelta=-0.027090764086694197
    New Minimum: -0.356541092065382 > -0.36288844580555235
    END: th(4406890.43989929)=-0.36288844580555235; dx=-1.2537511606689829E-8 evalInputDelta=0.0063473537401703695
    Fitness changed from -0.356541092065382 to -0.36288844580555235
    Iteration 29 complete. Error: -0.36288844580555235 Total: 29.4950; Orientation: 0.3788; Line Search: 21.9422
    Adding measurement 14d6ede3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.783e+03, gradient 1.514e-04, dot -0.762; [bf29958e-f0db-42dd-85c4-5e7d69e168b3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.3390894122564658, -0.3488129122758088, -0.356541092065382, -0.36288844580555235
    LBFGS Accumulation History: 3 points
    Removed measurement 2a0881f1 to history. Total: 4
    th(0)=-0.36288844580555235;dx=-2.2916646480305787E-8
    Armijo: th(9494357.6388889)=-0.31697780051210955; dx=-5.128950721063436E-9 evalInputDelta=-0.0459106452934428
    New Minimum: -0.36288844580555235 > -0.3663634843625472
    END: th(4747178.81944445)=-0.3663634843625472; dx=-1.1120707533230848E-8 evalInputDelta=0.003475038556994825
    Fitness changed from -0.36288844580555235 to -0.3663634843625472
    Iteration 30 complete. Error: -0.3663634843625472 Total: 29.4046; Orientation: 0.3854; Line Search: 22.2195
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/61237f2a-5889-415b-9d86-f436832a092c.jpg)
    
    Final threshold in iteration 31: -0.3663634843625472 (> -Infinity) after 933.981s (< 3600.000s)
    

Returns:

    -0.3663634843625472