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

Iteration 35 Iteration 35

Iteration 40 Iteration 40

Iteration 45 Iteration 45

Iteration 50 Iteration 50

Code from BasicOptimizer.scala:75 executed in 253.22 seconds (4.169 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: 2064616244491
    Reset training subject: 2065412709401
    Adding measurement 8b56e3c to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.9116989105402018;dx=-1.5007394215150164E-8
    New Minimum: 0.9116989105402018 > 0.9116988851449356
    WOLFE (weak): th(2.154434690031884)=0.9116988851449356; dx=-1.5007391366026838E-8 evalInputDelta=2.539526622324928E-8
    New Minimum: 0.9116988851449356 > 0.9116988597496888
    WOLFE (weak): th(4.308869380063768)=0.9116988597496888; dx=-1.5007381102706896E-8 evalInputDelta=5.079051301759563E-8
    New Minimum: 0.9116988597496888 > 0.9116987581691719
    WOLFE (weak): th(12.926608140191302)=0.9116987581691719; dx=-1.50073170620004E-8 evalInputDelta=1.523710299045078E-7
    New Minimum: 0.9116987581691719 > 0.911698301055823
    WOLFE (weak): th(51.70643256076521)=0.911698301055823; dx=-1.5007538415740036E-8 evalInputDelta=6.094843788551074E-7
    New Minimum: 0.911698301055823 > 0.9116958630807103
    WOLFE (weak): th(258.53216280382605)=0.9116958630807103; dx=-1.5007517773079436E-8 evalInputDelta=3.047459491534177E-6
    New Minimum: 0.9116958630807103 > 0.911680626094525
    WOLFE (weak): th(1551.1929768229563)=0.911680626094525; dx=-1.5008811252186185E-8 evalInputDelta=1.8284445676752803E-5
    New Minimum: 0.911680626094525 > 0.9115708714746799
    WOLFE (weak): th(10858.350837760694)=0.9115708714746799; dx=-1.5021631228577057E-8 evalInputDelta=1.2803906552194544E-4
    New Minimum: 0.9115708714746799 > 0.910671283216206
    WOLFE (weak): th(86866.80670208555)=0.910671283216206; dx=-1.509525939043656E-8 evalInputDelta=0.00102762732399575
    New Minimum: 0.910671283216206 > 0.902367257517345
    WOLFE (weak): th(781801.26031877)=0.902367257517345; dx=-1.523963550400463E-8 evalInputDelta=0.009331653022856767
    New Minimum: 0.902367257517345 > 0.8454220048455928
    END: th(7818012.6031877)=0.8454220048455928; dx=-7.157388183104475E-9 evalInputDelta=0.06627690569460898
    Fitness changed from 0.9116989105402018 to 0.8454220048455928
    Iteration 1 complete. Error: 0.8454220048455

...skipping 43316 bytes...

     1.6181; Line Search: 2.5597
    Adding measurement 48771c0f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.330e+03, gradient 2.851e-05, dot -0.739; [8cf054e4-c180-441f-889c-242e8981a63a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2875422132408851, 0.2867987708034744, 0.2861981490836258, 0.28604713782193847
    LBFGS Accumulation History: 3 points
    Removed measurement 768e4e56 to history. Total: 4
    th(0)=0.28604713782193847;dx=-8.129193156832537E-10
    Armijo: th(4.3349739618919104E7)=0.2952355894900912; dx=-1.3519458498041185E-10 evalInputDelta=-0.009188451668152742
    Armijo: th(2.1674869809459552E7)=0.28621723482290307; dx=-3.0487502968313076E-10 evalInputDelta=-1.7009700096459746E-4
    New Minimum: 0.28604713782193847 > 0.2844901151840312
    END: th(7224956.603153184)=0.2844901151840312; dx=-6.115619015737157E-10 evalInputDelta=0.001557022637907246
    Fitness changed from 0.28604713782193847 to 0.2844901151840312
    Iteration 49 complete. Error: 0.2844901151840312 Total: 5.7698; Orientation: 1.6360; Line Search: 3.4367
    Adding measurement 7d539d5a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.018e+03, gradient 2.529e-05, dot -0.893; [8cf054e4-c180-441f-889c-242e8981a63a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2867987708034744, 0.2861981490836258, 0.28604713782193847, 0.2844901151840312
    LBFGS Accumulation History: 3 points
    Removed measurement 70e9daa8 to history. Total: 4
    th(0)=0.2844901151840312;dx=-6.393677965237891E-10
    New Minimum: 0.2844901151840312 > 0.2837380759997861
    END: th(1.5565697139808143E7)=0.2837380759997861; dx=-4.744221275601902E-10 evalInputDelta=7.520391842451013E-4
    Fitness changed from 0.2844901151840312 to 0.2837380759997861
    Iteration 50 complete. Error: 0.2837380759997861 Total: 4.0040; Orientation: 1.6172; Line Search: 1.6984
    <a id="p-29"></a>Iteration 50
    <a id="p-28"></a>![Iteration 50](etc/7e074dff-df39-45d0-89e7-2b105692bf0e.jpg)
    
    Final threshold in iteration 51: 0.2837380759997861 (> -Infinity) after 253.222s (< 3600.000s)
    

Returns:

    0.2837380759997861