Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Code from BasicOptimizer.scala:75 executed in 62.06 seconds (0.860 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: 911662297613400
    Reset training subject: 911664141426200
    Adding measurement 4af40c48 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.014178305864334106;dx=-1.1084261135615536E-8
    New Minimum: 0.014178305864334106 > 0.014178246259689331
    WOLFE (weak): th(2.154434690031884)=0.014178246259689331; dx=-1.1041606906325921E-8 evalInputDelta=5.9604644775390625E-8
    WOLFE (weak): th(4.308869380063768)=0.014178246259689331; dx=-1.1041606846344125E-8 evalInputDelta=5.9604644775390625E-8
    WOLFE (weak): th(12.926608140191302)=0.014178246259689331; dx=-1.1041617143868256E-8 evalInputDelta=5.9604644775390625E-8
    New Minimum: 0.014178246259689331 > 0.014177918434143066
    WOLFE (weak): th(51.70643256076521)=0.014177918434143066; dx=-1.1041599544854655E-8 evalInputDelta=3.8743019104003906E-7
    New Minimum: 0.014177918434143066 > 0.01417645812034607
    WOLFE (weak): th(258.53216280382605)=0.01417645812034607; dx=-1.1041549553296012E-8 evalInputDelta=1.8477439880371094E-6
    New Minimum: 0.01417645812034607 > 0.0141676664352417
    WOLFE (weak): th(1551.1929768229563)=0.0141676664352417; dx=-1.1041218359314807E-8 evalInputDelta=1.0639429092407227E-5
    New Minimum: 0.0141676664352417 > 0.014103978872299194
    WOLFE (weak): th(10858.350837760694)=0.014103978872299194; dx=-1.1045740843490477E-8 evalInputDelta=7.432699203491211E-5
    New Minimum: 0.014103978872299194 > 0.01358458399772644
    WOLFE (weak): th(86866.80670208555)=0.01358458399772644; dx=-1.1028419039232504E-8 evalInputDelta=5.93721866607666E-4
    New Minimum: 0.01358458399772644 > 0.008886754512786865
    WOLFE (weak): th(781801.26031877)=0.008886754512786865; dx=-1.0864883932305543E-8 evalInputDelta=0.005291551351547241
    New Minimum: 0.008886754512786865 > -0.031813979148864746
    END: th(7818012.6031877)=-0.031813979148864746; dx=-9.032414376012962E-9 evalInputDelta=0.04599228501319885
    Fitness changed from 0.014178305864334106 to -0.031813979148864746
    Iteration 1 complete. Error: -0.031813979148864746 

...skipping 2254 bytes...

    asurement 64af09ff to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.878e+03, gradient 5.446e-05, dot -0.810; [f5f397e9-c42c-45d7-b157-d4bc59ddb442 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.031813979148864746, -0.0954139232635498, -0.1617511510848999, -0.19891750812530518
    LBFGS Accumulation History: 3 points
    Removed measurement 3964ed5 to history. Total: 4
    th(0)=-0.19891750812530518;dx=-2.966179405182098E-9
    Armijo: th(1.6843397559414053E8)=-0.14777004718780518; dx=-7.604671477386136E-10 evalInputDelta=-0.0511474609375
    New Minimum: -0.19891750812530518 > -0.21620872616767883
    END: th(8.421698779707026E7)=-0.21620872616767883; dx=-1.3607094167751308E-9 evalInputDelta=0.017291218042373657
    Fitness changed from -0.19891750812530518 to -0.21620872616767883
    Iteration 5 complete. Error: -0.21620872616767883 Total: 8.5001; Orientation: 0.8719; Line Search: 5.7644
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/73698293-ed60-4448-bc0c-98844cbe8661.jpg)
    
    Adding measurement cba83ed to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.091e+04, gradient 4.890e-05, dot -0.798; [f5f397e9-c42c-45d7-b157-d4bc59ddb442 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.0954139232635498, -0.1617511510848999, -0.19891750812530518, -0.21620872616767883
    LBFGS Accumulation History: 3 points
    Removed measurement 568decdc to history. Total: 4
    th(0)=-0.21620872616767883;dx=-2.3912322856106284E-9
    Armijo: th(1.8144000000000003E8)=-0.1554250717163086; dx=-7.32425708629513E-10 evalInputDelta=-0.06078365445137024
    New Minimum: -0.21620872616767883 > -0.2245682179927826
    END: th(9.072000000000001E7)=-0.2245682179927826; dx=-1.167205671705129E-9 evalInputDelta=0.00835949182510376
    Fitness changed from -0.21620872616767883 to -0.2245682179927826
    Iteration 6 complete. Error: -0.2245682179927826 Total: 8.5932; Orientation: 0.8781; Line Search: 5.8389
    Final threshold in iteration 7: -0.2245682179927826 (> -Infinity) after 62.058s (< 720.000s)
    

Returns:

    -0.2245682179927826