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 3115.91 seconds (19.373 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: 889276858117100
    Reset training subject: 889303430917000
    Adding measurement 4735d6e5 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=5.637145787477493;dx=-1.6283299657588362E-6
    New Minimum: 5.637145787477493 > 5.637144759297371
    WOLFE (weak): th(2.154434690031884)=5.637144759297371; dx=-1.6283260946102264E-6 evalInputDelta=1.0281801223754883E-6
    New Minimum: 5.637144759297371 > 5.637141183018684
    WOLFE (weak): th(4.308869380063768)=5.637141183018684; dx=-1.628319608999876E-6 evalInputDelta=4.604458808898926E-6
    New Minimum: 5.637141183018684 > 5.637128382921219
    WOLFE (weak): th(12.926608140191302)=5.637128382921219; dx=-1.6282538895364828E-6 evalInputDelta=1.7404556274414062E-5
    New Minimum: 5.637128382921219 > 5.637077063322067
    WOLFE (weak): th(51.70643256076521)=5.637077063322067; dx=-1.628220528588186E-6 evalInputDelta=6.872415542602539E-5
    New Minimum: 5.637077063322067 > 5.636802330613136
    WOLFE (weak): th(258.53216280382605)=5.636802330613136; dx=-1.6281180389126697E-6 evalInputDelta=3.4345686435699463E-4
    New Minimum: 5.636802330613136 > 5.635085090994835
    WOLFE (weak): th(1551.1929768229563)=5.635085090994835; dx=-1.627817361343197E-6 evalInputDelta=0.0020606964826583862
    New Minimum: 5.635085090994835 > 5.622730225324631
    WOLFE (weak): th(10858.350837760694)=5.622730225324631; dx=-1.6241782334881423E-6 evalInputDelta=0.014415562152862549
    New Minimum: 5.622730225324631 > 5.523842930793762
    WOLFE (weak): th(86866.80670208555)=5.523842930793762; dx=-1.5569282603929406E-6 evalInputDelta=0.11330285668373108
    New Minimum: 5.523842930793762 > 4.753770336508751
    END: th(781801.26031877)=4.753770336508751; dx=-1.1022196355013617E-6 evalInputDelta=0.8833754509687424
    Fitness changed from 5.637145787477493 to 4.753770336508751
    Iteration 1 complete. Error: 4.753770336508751 Total: 328.0287; Orientation: 0.0588; Line Search: 252.4460
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/dcd3e74c-d823-4bbb-8562-021

...skipping 24446 bytes...

    0/1.000e+00]
    Orientation rejected. Popping history element from -2.4995240345597267, -2.527834877371788, -2.5455641597509384, -2.5629535391926765
    LBFGS Accumulation History: 3 points
    Removed measurement 209f3887 to history. Total: 4
    th(0)=-2.5629535391926765;dx=-3.2625875759481827E-9
    Armijo: th(6.267577514523436E7)=-2.5246553868055344; dx=6.605261646898111E-10 evalInputDelta=-0.03829815238714218
    New Minimum: -2.5629535391926765 > -2.572868876159191
    END: th(3.133788757261718E7)=-2.572868876159191; dx=-2.505167835377356E-10 evalInputDelta=0.009915336966514587
    Fitness changed from -2.5629535391926765 to -2.572868876159191
    Iteration 29 complete. Error: -2.572868876159191 Total: 101.5185; Orientation: 1.4150; Line Search: 74.9739
    Adding measurement 570a62a5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.698e+03, gradient 6.199e-05, dot -0.604; [fe227a33-8d56-4737-825b-880e2fff1a0f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.527834877371788, -2.5455641597509384, -2.5629535391926765, -2.572868876159191
    LBFGS Accumulation History: 3 points
    Removed measurement 3c28e5b6 to history. Total: 4
    th(0)=-2.572868876159191;dx=-3.842544809930474E-9
    Armijo: th(6.751543209876552E7)=-2.5140877068042755; dx=8.825220576356366E-10 evalInputDelta=-0.05878116935491562
    New Minimum: -2.572868876159191 > -2.5800098329782486
    WOLF (strong): th(3.375771604938276E7)=-2.5800098329782486; dx=1.0320726234763562E-10 evalInputDelta=0.007140956819057465
    New Minimum: -2.5800098329782486 > -2.593721315264702
    END: th(1.125257201646092E7)=-2.593721315264702; dx=-1.8171693021099397E-9 evalInputDelta=0.02085243910551071
    Fitness changed from -2.572868876159191 to -2.593721315264702
    Iteration 30 complete. Error: -2.593721315264702 Total: 126.6547; Orientation: 1.4534; Line Search: 100.1239
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/10670abd-a852-45e5-a0f2-2a5dca8348ec.jpg)
    
    Final threshold in iteration 31: -2.593721315264702 (> -Infinity) after 3115.900s (< 3600.000s)
    

Returns:

    -2.593721315264702