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 792.89 seconds (6.349 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: 954233543489600
    Reset training subject: 954259674600400
    Adding measurement 75c96e29 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=4.260457053780556;dx=-5.2071264450681104E-5
    New Minimum: 4.260457053780556 > 4.260376803576946
    WOLFE (weak): th(2.154434690031884)=4.260376803576946; dx=-5.205131397312385E-5 evalInputDelta=8.025020360946655E-5
    New Minimum: 4.260376803576946 > 4.260296568274498
    WOLFE (weak): th(4.308869380063768)=4.260296568274498; dx=-5.2078489462383356E-5 evalInputDelta=1.6048550605773926E-4
    New Minimum: 4.260296568274498 > 4.259971801191568
    WOLFE (weak): th(12.926608140191302)=4.259971801191568; dx=-5.22203251860018E-5 evalInputDelta=4.8525258898735046E-4
    New Minimum: 4.259971801191568 > 4.258536655455828
    WOLFE (weak): th(51.70643256076521)=4.258536655455828; dx=-5.1088597153778746E-5 evalInputDelta=0.001920398324728012
    New Minimum: 4.258536655455828 > 4.250233098864555
    WOLFE (weak): th(258.53216280382605)=4.250233098864555; dx=-4.909282448097253E-5 evalInputDelta=0.010223954916000366
    New Minimum: 4.250233098864555 > 4.177377711981535
    WOLFE (weak): th(1551.1929768229563)=4.177377711981535; dx=-4.767775297568878E-5 evalInputDelta=0.08307934179902077
    New Minimum: 4.177377711981535 > 3.9807247072458267
    END: th(10858.350837760694)=3.9807247072458267; dx=-6.218692039025965E-6 evalInputDelta=0.279732346534729
    Fitness changed from 4.260457053780556 to 3.9807247072458267
    Iteration 1 complete. Error: 3.9807247072458267 Total: 282.2244; Orientation: 0.0037; Line Search: 205.3996
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/3220eb25-fb65-4297-84a5-9623c214cf8a.jpg)
    
    Adding measurement 215071fe to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=3.9807247072458267;dx=-7.76551156793465E-5
    New Minimum: 3.9807247072458267 > 3.894109755754471
    WOLF (strong): th(23393.607721408407)=3.894109755754471; dx=7.422366379729696E-6 evalInputDelta=0.0866149514913559
    New Minimum: 3.8

...skipping 2151 bytes...

    -4289-b6f6-0fca7981ffa4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.9807247072458267, 3.836270436644554, 3.751320205628872, 3.5984555073082447
    LBFGS Accumulation History: 3 points
    Removed measurement 215071fe to history. Total: 4
    th(0)=3.5984555073082447;dx=-2.2749663942101146E-4
    New Minimum: 3.5984555073082447 > 3.2760191336274147
    WOLF (strong): th(38989.346202347355)=3.2760191336274147; dx=1.8301981518188007E-6 evalInputDelta=0.32243637368083
    New Minimum: 3.2760191336274147 > 3.2353624403476715
    WOLF (strong): th(19494.673101173677)=3.2353624403476715; dx=2.0331444949239013E-5 evalInputDelta=0.3630930669605732
    END: th(6498.224367057893)=3.2453999295830727; dx=-3.330577570048731E-5 evalInputDelta=0.35305557772517204
    Fitness changed from 3.5984555073082447 to 3.2353624403476715
    Iteration 5 complete. Error: 3.2353624403476715 Total: 127.6937; Orientation: 0.1078; Line Search: 101.4106
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/5d4dbcb4-d4a7-4381-bb91-62139bdb1ada.jpg)
    
    Adding measurement 12991c84 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.823e+02, gradient 1.718e-02, dot -0.694; [f618ef2b-f75c-4289-b6f6-0fca7981ffa4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.836270436644554, 3.751320205628872, 3.5984555073082447, 3.2353624403476715
    LBFGS Accumulation History: 3 points
    Removed measurement 41ba2a23 to history. Total: 4
    th(0)=3.2353624403476715;dx=-2.952418990876538E-4
    New Minimum: 3.2353624403476715 > 3.0557183884084225
    WOLF (strong): th(14000.000000000005)=3.0557183884084225; dx=6.662762404478932E-7 evalInputDelta=0.17964405193924904
    END: th(7000.000000000003)=3.0975416973233223; dx=-1.833576890767471E-5 evalInputDelta=0.1378207430243492
    Fitness changed from 3.2353624403476715 to 3.0557183884084225
    Iteration 6 complete. Error: 3.0557183884084225 Total: 101.2585; Orientation: 0.1105; Line Search: 75.6686
    Final threshold in iteration 6: 3.0557183884084225 (> -Infinity) after 792.889s (< 720.000s)
    

Returns:

    3.0557183884084225