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 41.61 seconds (0.581 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: 927831235717700
    Reset training subject: 927832898930100
    Adding measurement 2cc6b636 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=2.733064889907837;dx=-2.3950000476833077E-5
    New Minimum: 2.733064889907837 > 2.733026087284088
    WOLFE (weak): th(2.154434690031884)=2.733026087284088; dx=-2.3960571495892823E-5 evalInputDelta=3.88026237487793E-5
    New Minimum: 2.733026087284088 > 2.7329870387911797
    WOLFE (weak): th(4.308869380063768)=2.7329870387911797; dx=-2.3967397524967208E-5 evalInputDelta=7.785111665725708E-5
    New Minimum: 2.7329870387911797 > 2.7328310757875443
    WOLFE (weak): th(12.926608140191302)=2.7328310757875443; dx=-2.3953042945998953E-5 evalInputDelta=2.3381412029266357E-4
    New Minimum: 2.7328310757875443 > 2.7321296334266663
    WOLFE (weak): th(51.70643256076521)=2.7321296334266663; dx=-2.3932056435075116E-5 evalInputDelta=9.352564811706543E-4
    New Minimum: 2.7321296334266663 > 2.7283895686268806
    WOLFE (weak): th(258.53216280382605)=2.7283895686268806; dx=-2.4113707760252858E-5 evalInputDelta=0.004675321280956268
    New Minimum: 2.7283895686268806 > 2.707121178507805
    END: th(1551.1929768229563)=2.707121178507805; dx=-1.8672095332013934E-5 evalInputDelta=0.025943711400032043
    Fitness changed from 2.733064889907837 to 2.707121178507805
    Iteration 1 complete. Error: 2.707121178507805 Total: 16.6229; Orientation: 0.0151; Line Search: 11.7011
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/128e3a59-55e8-4674-8893-07d66f9aaf0a.jpg)
    
    Adding measurement 6efe9309 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=2.707121178507805;dx=-1.6785516300289952E-5
    New Minimum: 2.707121178507805 > 2.666731536388397
    END: th(3341.943960201201)=2.666731536388397; dx=-1.3667728711630812E-5 evalInputDelta=0.040389642119407654
    Fitness changed from 2.707121178507805 to 2.666731536388397
    Iteration 2 complete. Error: 2.666731536388397 Total: 4.7249; Orientation: 0.0161; Line Search: 3.1161
    <a id="p-5"></a

...skipping 1285 bytes...

    8
    Fitness changed from 2.6033891290426254 to 2.5083324052393436
    Iteration 4 complete. Error: 2.5083324052393436 Total: 5.2807; Orientation: 0.4515; Line Search: 3.2134
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/2fbbdc9c-9801-4c96-82b1-27cb35356155.jpg)
    
    Adding measurement 43daf2fa to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.402e+02, gradient 2.778e-03, dot -0.901; [a96d9450-57da-433b-b2e7-a48b2837e830 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.707121178507805, 2.666731536388397, 2.6033891290426254, 2.5083324052393436
    LBFGS Accumulation History: 3 points
    Removed measurement 6efe9309 to history. Total: 4
    th(0)=2.5083324052393436;dx=-7.715766639037787E-6
    New Minimum: 2.5083324052393436 > 2.375080708414316
    END: th(33419.43960201202)=2.375080708414316; dx=-4.085395269324445E-6 evalInputDelta=0.13325169682502747
    Fitness changed from 2.5083324052393436 to 2.375080708414316
    Iteration 5 complete. Error: 2.375080708414316 Total: 5.1176; Orientation: 0.4381; Line Search: 3.2425
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/815888a3-98cf-4a82-a8cc-486ec4bc8a99.jpg)
    
    Adding measurement 665549a5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.791e+02, gradient 3.199e-03, dot -0.683; [a96d9450-57da-433b-b2e7-a48b2837e830 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.666731536388397, 2.6033891290426254, 2.5083324052393436, 2.375080708414316
    LBFGS Accumulation History: 3 points
    Removed measurement 262f9a64 to history. Total: 4
    th(0)=2.375080708414316;dx=-1.0232867972384104E-5
    New Minimum: 2.375080708414316 > 2.231841281056404
    END: th(72000.00000000003)=2.231841281056404; dx=-1.3528234497497127E-6 evalInputDelta=0.14323942735791206
    Fitness changed from 2.375080708414316 to 2.231841281056404
    Iteration 6 complete. Error: 2.231841281056404 Total: 5.2373; Orientation: 0.4648; Line Search: 3.1820
    Final threshold in iteration 7: 2.231841281056404 (> -Infinity) after 41.610s (< 720.000s)
    

Returns:

    2.231841281056404