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 929.33 seconds (7.496 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: 981488336142200
    Reset training subject: 981495821955200
    Adding measurement 3b218c74 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=12.548182896175215;dx=-3.055448126561162E-5
    New Minimum: 12.548182896175215 > 12.548109058799579
    WOLFE (weak): th(2.154434690031884)=12.548109058799579; dx=-3.055136401374326E-5 evalInputDelta=7.383737563593229E-5
    New Minimum: 12.548109058799579 > 12.548034724121257
    WOLFE (weak): th(4.308869380063768)=12.548034724121257; dx=-3.056348412186956E-5 evalInputDelta=1.481720539580067E-4
    New Minimum: 12.548034724121257 > 12.547739140066843
    WOLFE (weak): th(12.926608140191302)=12.547739140066843; dx=-3.055716273817412E-5 evalInputDelta=4.4375610837121826E-4
    New Minimum: 12.547739140066843 > 12.546409125325486
    WOLFE (weak): th(51.70643256076521)=12.546409125325486; dx=-3.054632003703446E-5 evalInputDelta=0.0017737708497289617
    New Minimum: 12.546409125325486 > 12.53931721408197
    WOLFE (weak): th(258.53216280382605)=12.53931721408197; dx=-3.052369170923763E-5 evalInputDelta=0.008865682093244232
    New Minimum: 12.53931721408197 > 12.494046579333196
    WOLFE (weak): th(1551.1929768229563)=12.494046579333196; dx=-3.0287446279195314E-5 evalInputDelta=0.05413631684201903
    New Minimum: 12.494046579333196 > 12.183936027778085
    WOLFE (weak): th(10858.350837760694)=12.183936027778085; dx=-2.8613883544346903E-5 evalInputDelta=0.36424686839712983
    New Minimum: 12.183936027778085 > 10.272948930789548
    END: th(86866.80670208555)=10.272948930789548; dx=-1.6320567633005086E-5 evalInputDelta=2.2752339653856666
    Fitness changed from 12.548182896175215 to 10.272948930789548
    Iteration 1 complete. Error: 10.272948930789548 Total: 90.5493; Orientation: 0.0139; Line Search: 67.5159
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/4a7dc688-6d88-4d32-bbe8-19eab70069ba.jpg)
    
    Adding measurement 11e17893 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=10.272948930789548;dx=-1.201849318144474

...skipping 24322 bytes...

    42; Line Search: 22.3490
    Adding measurement 6caa4dc5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.584e+03, gradient 1.517e-04, dot -0.698; [3856e7fb-69e6-451c-a7b3-3db22e65af3f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.7110822793146472, 0.6780708366425205, 0.5959604991655194, 0.5488476264641742
    LBFGS Accumulation History: 3 points
    Removed measurement 438aaa9f to history. Total: 4
    th(0)=0.5488476264641742;dx=-2.297434146156954E-8
    Armijo: th(7834471.893154292)=0.5599733845029871; dx=6.78129617372828E-9 evalInputDelta=-0.011125758038812883
    New Minimum: 0.5488476264641742 > 0.5118085423800216
    END: th(3917235.946577146)=0.5118085423800216; dx=-4.615603085205848E-9 evalInputDelta=0.037039084084152574
    Fitness changed from 0.5488476264641742 to 0.5118085423800216
    Iteration 29 complete. Error: 0.5118085423800216 Total: 30.8091; Orientation: 0.2808; Line Search: 22.7216
    Adding measurement 5f3f3d00 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.644e+03, gradient 1.524e-04, dot -0.707; [3856e7fb-69e6-451c-a7b3-3db22e65af3f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6780708366425205, 0.5959604991655194, 0.5488476264641742, 0.5118085423800216
    LBFGS Accumulation History: 3 points
    Removed measurement 49986178 to history. Total: 4
    th(0)=0.5118085423800216;dx=-2.316840648057798E-8
    Armijo: th(8439429.012345687)=0.5551765322590314; dx=1.1165313609785145E-8 evalInputDelta=-0.043367989879009805
    New Minimum: 0.5118085423800216 > 0.4806769294388835
    END: th(4219714.506172843)=0.4806769294388835; dx=-1.1516190308549429E-9 evalInputDelta=0.031131612941138087
    Fitness changed from 0.5118085423800216 to 0.4806769294388835
    Iteration 30 complete. Error: 0.4806769294388835 Total: 30.1973; Orientation: 0.2560; Line Search: 22.5568
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/ef5d4d12-b543-45a9-aeb2-981401c1cb80.jpg)
    
    Final threshold in iteration 31: 0.4806769294388835 (> -Infinity) after 929.320s (< 3600.000s)
    

Returns:

    0.4806769294388835