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

Code from BasicOptimizer.scala:75 executed in 2660.35 seconds (29.225 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: 1582366918612800
    Reset training subject: 1582396709493700
    Adding measurement 3d01ea33 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=-29.54387171814839;dx=-3.006575647616757E-6
    New Minimum: -29.54387171814839 > -29.543872192502022
    WOLFE (weak): th(2.154434690031884)=-29.543872192502022; dx=-2.9988415078893154E-6 evalInputDelta=4.7435363015324583E-7
    New Minimum: -29.543872192502022 > -29.543872594833374
    WOLFE (weak): th(4.308869380063768)=-29.543872594833374; dx=-2.9988357000248912E-6 evalInputDelta=8.766849823871325E-7
    New Minimum: -29.543872594833374 > -29.543879335125286
    WOLFE (weak): th(12.926608140191302)=-29.543879335125286; dx=-2.9988250867670105E-6 evalInputDelta=7.616976894553318E-6
    New Minimum: -29.543879335125286 > -29.5438920284311
    WOLFE (weak): th(51.70643256076521)=-29.5438920284311; dx=-2.99874800541358E-6 evalInputDelta=2.0310282707214355E-5
    New Minimum: -29.5438920284311 > -29.54395931462447
    WOLFE (weak): th(258.53216280382605)=-29.54395931462447; dx=-2.998648058784259E-6 evalInputDelta=8.759647607803345E-5
    New Minimum: -29.54395931462447 > -29.544387198984623
    WOLFE (weak): th(1551.1929768229563)=-29.544387198984623; dx=-2.996314132510586E-6 evalInputDelta=5.15480836231319E-4
    New Minimum: -29.544387198984623 > -29.54746730128924
    WOLFE (weak): th(10858.350837760694)=-29.54746730128924; dx=-2.986072259048259E-6 evalInputDelta=0.003595583140850067
    New Minimum: -29.54746730128924 > -29.572117475171883
    WOLFE (weak): th(86866.80670208555)=-29.572117475171883; dx=-2.8891171017000203E-6 evalInputDelta=0.02824575702349108
    New Minimum: -29.572117475171883 > -29.75248198211193
    END: th(781801.26031877)=-29.75248198211193; dx=-2.1338923446946163E-6 evalInputDelta=0.2086102639635392
    Fitness changed from -29.54387171814839 to -29.75248198211193
    Iteration 1 complete. Error: -29.75248198211193 Total: 389.4155; Orientation: 0.0483; Line Search: 300.1969
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Itera

...skipping 15540 bytes...

    0.2802
    Adding measurement 3c4e23be to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.234e+04, gradient 9.005e-04, dot -0.805; [e2bc04e8-6903-4724-9d5b-3bcc44209cdd = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -30.221838881572086, -30.22713202983141, -30.24478980153799, -30.256661251187325
    LBFGS Accumulation History: 3 points
    Removed measurement f310675 to history. Total: 4
    th(0)=-30.256661251187325;dx=-8.109726840208699E-7
    Armijo: th(4712825.884444748)=-30.19533648590247; dx=-3.975805584983732E-7 evalInputDelta=-0.061324765284854976
    Armijo: th(2356412.942222374)=-30.253122645119827; dx=-4.6649358444194047E-7 evalInputDelta=-0.0035386060674973407
    New Minimum: -30.256661251187325 > -30.26291759808858
    END: th(785470.9807407913)=-30.26291759808858; dx=-5.388933428866542E-7 evalInputDelta=0.006256346901256649
    Fitness changed from -30.256661251187325 to -30.26291759808858
    Iteration 19 complete. Error: -30.26291759808858 Total: 148.9664; Orientation: 1.4760; Line Search: 117.2449
    Adding measurement 104cf647 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.585e+04, gradient 7.682e-04, dot -0.887; [e2bc04e8-6903-4724-9d5b-3bcc44209cdd = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -30.22713202983141, -30.24478980153799, -30.256661251187325, -30.26291759808858
    LBFGS Accumulation History: 3 points
    Removed measurement 2d758472 to history. Total: 4
    th(0)=-30.26291759808858;dx=-5.902036093270036E-7
    New Minimum: -30.26291759808858 > -30.271642302473385
    END: th(1692245.9289213265)=-30.271642302473385; dx=-5.171001818401184E-7 evalInputDelta=0.008724704384803772
    Fitness changed from -30.26291759808858 to -30.271642302473385
    Iteration 20 complete. Error: -30.271642302473385 Total: 93.2452; Orientation: 1.4495; Line Search: 60.6159
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/04360547-a167-42ca-89f0-b153b81d18d3.jpg)
    
    Final threshold in iteration 21: -30.271642302473385 (> -Infinity) after 2660.349s (< 3600.000s)
    

Returns:

    -30.271642302473385