Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:75 executed in 11279.46 seconds (457.254 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: 702162941326800
    Reset training subject: 702389423805500
    Adding measurement 6cee97e7 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=-2.072421234101057;dx=-4.5964483621973646E-7
    New Minimum: -2.072421234101057 > -2.072421293705702
    WOLFE (weak): th(2.154434690031884)=-2.072421293705702; dx=-4.517463932199605E-7 evalInputDelta=5.9604644775390625E-8
    New Minimum: -2.072421293705702 > -2.072421655058861
    WOLFE (weak): th(4.308869380063768)=-2.072421655058861; dx=-4.517463813642269E-7 evalInputDelta=4.209578037261963E-7
    New Minimum: -2.072421655058861 > -2.07242389395833
    WOLFE (weak): th(12.926608140191302)=-2.07242389395833; dx=-4.5174582997867544E-7 evalInputDelta=2.6598572731018066E-6
    New Minimum: -2.07242389395833 > -2.072434466332197
    WOLFE (weak): th(51.70643256076521)=-2.072434466332197; dx=-4.5174429766612E-7 evalInputDelta=1.3232231140136719E-5
    New Minimum: -2.072434466332197 > -2.072487734258175
    WOLFE (weak): th(258.53216280382605)=-2.072487734258175; dx=-4.5174142695740063E-7 evalInputDelta=6.650015711784363E-5
    New Minimum: -2.072487734258175 > -2.072820596396923
    WOLFE (weak): th(1551.1929768229563)=-2.072820596396923; dx=-4.517073056816629E-7 evalInputDelta=3.993622958660126E-4
    New Minimum: -2.072820596396923 > -2.0752161890268326
    WOLFE (weak): th(10858.350837760694)=-2.0752161890268326; dx=-4.5123334557457507E-7 evalInputDelta=0.002794954925775528
    New Minimum: -2.0752161890268326 > -2.0946852080523968
    WOLFE (weak): th(86866.80670208555)=-2.0946852080523968; dx=-4.4687889844274996E-7 evalInputDelta=0.02226397395133972
    New Minimum: -2.0946852080523968 > -2.263729501515627
    END: th(781801.26031877)=-2.263729501515627; dx=-4.072051353737799E-7 evalInputDelta=0.19130826741456985
    Fitness changed from -2.072421234101057 to -2.263729501515627
    Iteration 1 complete. Error: -2.263729501515627 Total: 2633.6742; Orientation: 0.4422; Line Search: 2030.9980
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1]

...skipping 8300 bytes...

    3701428510248661
    New Minimum: -5.125141177326441 > -5.152475925162435
    END: th(5848401.930352103)=-5.152475925162435; dx=-7.370683670616891E-9 evalInputDelta=0.06434903293848038
    Fitness changed from -5.088126892223954 to -5.152475925162435
    Iteration 11 complete. Error: -5.152475925162435 Total: 810.3569; Orientation: 10.0501; Line Search: 604.0600
    Adding measurement 3aab0444 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.154e+03, gradient 1.148e-04, dot -0.801; [ab86d93e-dd48-40a3-971a-3509994a7d29 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -4.928673164919019, -5.03126185759902, -5.088126892223954, -5.152475925162435
    LBFGS Accumulation History: 3 points
    Removed measurement 4f0dab33 to history. Total: 4
    th(0)=-5.152475925162435;dx=-1.3188939192614627E-8
    New Minimum: -5.152475925162435 > -5.207292966544628
    END: th(1.2600000000000004E7)=-5.207292966544628; dx=-6.769398129907002E-9 evalInputDelta=0.054817041382193565
    Fitness changed from -5.152475925162435 to -5.207292966544628
    Iteration 12 complete. Error: -5.207292966544628 Total: 612.8043; Orientation: 9.9283; Line Search: 397.4332
    Adding measurement 43fa9254 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.018e+03, gradient 1.132e-04, dot -0.779; [ab86d93e-dd48-40a3-971a-3509994a7d29 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -5.03126185759902, -5.088126892223954, -5.152475925162435, -5.207292966544628
    LBFGS Accumulation History: 3 points
    Removed measurement 1fc31a3e to history. Total: 4
    th(0)=-5.207292966544628;dx=-1.2810207472538853E-8
    New Minimum: -5.207292966544628 > -5.26214012503624
    END: th(2.7145877094401743E7)=-5.26214012503624; dx=-2.343716908062904E-9 evalInputDelta=0.05484715849161148
    Fitness changed from -5.207292966544628 to -5.26214012503624
    Iteration 13 complete. Error: -5.26214012503624 Total: 595.8077; Orientation: 10.1516; Line Search: 390.1718
    Final threshold in iteration 13: -5.26214012503624 (> -Infinity) after 11279.447s (< 10800.000s)
    

Returns:

    -5.26214012503624