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 3958.80 seconds (164.653 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: 663669372126700
    Reset training subject: 663759078152100
    Adding measurement 6f85b13b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.5889671593904495;dx=-4.0140646118435674E-7
    New Minimum: 1.5889671593904495 > 1.5889666825532913
    WOLFE (weak): th(2.154434690031884)=1.5889666825532913; dx=-3.8427614345548565E-7 evalInputDelta=4.76837158203125E-7
    New Minimum: 1.5889666825532913 > 1.5889662951231003
    WOLFE (weak): th(4.308869380063768)=1.5889662951231003; dx=-3.842760698267513E-7 evalInputDelta=8.642673492431641E-7
    New Minimum: 1.5889662951231003 > 1.5889642983675003
    WOLFE (weak): th(12.926608140191302)=1.5889642983675003; dx=-3.842750386728435E-7 evalInputDelta=2.86102294921875E-6
    New Minimum: 1.5889642983675003 > 1.5889562368392944
    WOLFE (weak): th(51.70643256076521)=1.5889562368392944; dx=-3.8427741686847537E-7 evalInputDelta=1.0922551155090332E-5
    New Minimum: 1.5889562368392944 > 1.5889132916927338
    WOLFE (weak): th(258.53216280382605)=1.5889132916927338; dx=-3.8425818142448526E-7 evalInputDelta=5.386769771575928E-5
    New Minimum: 1.5889132916927338 > 1.588644951581955
    WOLFE (weak): th(1551.1929768229563)=1.588644951581955; dx=-3.8416805462203904E-7 evalInputDelta=3.2220780849456787E-4
    New Minimum: 1.588644951581955 > 1.5867147594690323
    WOLFE (weak): th(10858.350837760694)=1.5867147594690323; dx=-3.837799074949133E-7 evalInputDelta=0.0022523999214172363
    New Minimum: 1.5867147594690323 > 1.5710563361644745
    WOLFE (weak): th(86866.80670208555)=1.5710563361644745; dx=-3.805476024346747E-7 evalInputDelta=0.017910823225975037
    New Minimum: 1.5710563361644745 > 1.4379330277442932
    END: th(781801.26031877)=1.4379330277442932; dx=-3.477619479398837E-7 evalInputDelta=0.1510341316461563
    Fitness changed from 1.5889671593904495 to 1.4379330277442932
    Iteration 1 complete. Error: 1.4379330277442932 Total: 1212.5281; Orientation: 0.2232; Line Search: 938.1726
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/98

...skipping 4773 bytes...

     3
    Rejected: LBFGS Orientation magnitude: 1.168e+04, gradient 2.894e-04, dot -0.709; [cfc04771-33df-4763-846c-bc587baabeb0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.10831959545612335, -1.0655966103076935, -1.687209591269493, -1.9320643544197083
    LBFGS Accumulation History: 3 points
    Removed measurement 3f9aa22e to history. Total: 4
    th(0)=-1.9320643544197083;dx=-8.374752841100336E-8
    Armijo: th(8.421698779707026E7)=-0.24659235775470734; dx=2.11372454814942E-8 evalInputDelta=-1.685471996665001
    New Minimum: -1.9320643544197083 > -2.131363734602928
    END: th(4.210849389853513E7)=-2.131363734602928; dx=-8.26937466642508E-9 evalInputDelta=0.1992993801832199
    Fitness changed from -1.9320643544197083 to -2.131363734602928
    Iteration 8 complete. Error: -2.131363734602928 Total: 392.9127; Orientation: 4.3630; Line Search: 288.6991
    Adding measurement 403c300f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.066e+04, gradient 2.856e-04, dot -0.666; [cfc04771-33df-4763-846c-bc587baabeb0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.0655966103076935, -1.687209591269493, -1.9320643544197083, -2.131363734602928
    LBFGS Accumulation History: 3 points
    Removed measurement 21251a4 to history. Total: 4
    th(0)=-2.131363734602928;dx=-8.156279440744078E-8
    Armijo: th(9.072000000000001E7)=0.11483331024646759; dx=1.6432361529701328E-8 evalInputDelta=-2.2461970448493958
    New Minimum: -2.131363734602928 > -2.208232417702675
    WOLF (strong): th(4.536000000000001E7)=-2.208232417702675; dx=3.037091096387395E-9 evalInputDelta=0.0768686830997467
    New Minimum: -2.208232417702675 > -2.495437040925026
    END: th(1.5120000000000002E7)=-2.495437040925026; dx=-2.518172627757925E-8 evalInputDelta=0.3640733063220978
    Fitness changed from -2.131363734602928 to -2.495437040925026
    Iteration 9 complete. Error: -2.495437040925026 Total: 487.8220; Orientation: 4.3243; Line Search: 385.8485
    Final threshold in iteration 9: -2.495437040925026 (> -Infinity) after 3958.788s (< 3600.000s)
    

Returns:

    -2.495437040925026