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

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:75 executed in 2484.68 seconds (24.464 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: 1080801645733899
    Reset training subject: 1080821140999200
    Adding measurement 1fba15d7 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.8756767897340563;dx=-3.9332071706361496E-7
    New Minimum: 1.8756767897340563 > 1.8756761936876085
    WOLFE (weak): th(2.154434690031884)=1.8756761936876085; dx=-3.907858024930739E-7 evalInputDelta=5.960464477539062E-7
    New Minimum: 1.8756761936876085 > 1.8756750090554015
    WOLFE (weak): th(4.308869380063768)=1.8756750090554015; dx=-3.9078556587729047E-7 evalInputDelta=1.7806786547502895E-6
    New Minimum: 1.8756750090554015 > 1.8756714030047164
    WOLFE (weak): th(12.926608140191302)=1.8756714030047164; dx=-3.9078783663155227E-7 evalInputDelta=5.386729339917906E-6
    New Minimum: 1.8756714030047164 > 1.875655578082715
    WOLFE (weak): th(51.70643256076521)=1.875655578082715; dx=-3.9078293203737343E-7 evalInputDelta=2.1211651341168647E-5
    New Minimum: 1.875655578082715 > 1.875570306824581
    WOLFE (weak): th(258.53216280382605)=1.875570306824581; dx=-3.907605683504312E-7 evalInputDelta=1.064829094752362E-4
    New Minimum: 1.875570306824581 > 1.8750373707668873
    WOLFE (weak): th(1551.1929768229563)=1.8750373707668873; dx=-3.906566527534067E-7 evalInputDelta=6.394189671690143E-4
    New Minimum: 1.8750373707668873 > 1.87120681733738
    WOLFE (weak): th(10858.350837760694)=1.87120681733738; dx=-3.8993397128044885E-7 evalInputDelta=0.004469972396676347
    New Minimum: 1.87120681733738 > 1.840191935428055
    WOLFE (weak): th(86866.80670208555)=1.840191935428055; dx=-3.8376470014851404E-7 evalInputDelta=0.035484854306001345
    New Minimum: 1.840191935428055 > 1.5808163191276852
    END: th(781801.26031877)=1.5808163191276852; dx=-3.240635165329574E-7 evalInputDelta=0.2948604706063711
    Fitness changed from 1.8756767897340563 to 1.5808163191276852
    Iteration 1 complete. Error: 1.5808163191276852 Total: 257.1535; Orientation: 0.0359; Line Search: 197.6802
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/aa706a34-35

...skipping 25176 bytes...

    plete. Error: -0.4487953229116337 Total: 98.5487; Orientation: 1.0450; Line Search: 78.1432
    Adding measurement 6499fda5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.505e+03, gradient 7.027e-05, dot -0.861; [e43dc92b-88c7-4bef-8d64-7bf49af310fb = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.4296634188021142, -0.4339739408240664, -0.43832636981737827, -0.4487953229116337
    LBFGS Accumulation History: 3 points
    Removed measurement 12e4c6a0 to history. Total: 4
    th(0)=-0.4487953229116337;dx=-4.93747079462735E-9
    New Minimum: -0.4487953229116337 > -0.45448373708333767
    END: th(5875853.91986572)=-0.45448373708333767; dx=-1.962306190227703E-9 evalInputDelta=0.005688414171703959
    Fitness changed from -0.4487953229116337 to -0.45448373708333767
    Iteration 29 complete. Error: -0.45448373708333767 Total: 60.8205; Orientation: 1.0365; Line Search: 40.2932
    Adding measurement 3f5fd883 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.434e+03, gradient 7.262e-05, dot -0.710; [e43dc92b-88c7-4bef-8d64-7bf49af310fb = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.4339739408240664, -0.43832636981737827, -0.4487953229116337, -0.45448373708333767
    LBFGS Accumulation History: 3 points
    Removed measurement 4b56971a to history. Total: 4
    th(0)=-0.45448373708333767;dx=-5.273860700768678E-9
    Armijo: th(1.2659143518518532E7)=-0.44614095120027875; dx=-3.2325730106766817E-10 evalInputDelta=-0.008342785883058923
    New Minimum: -0.45448373708333767 > -0.45851746402966076
    END: th(6329571.759259266)=-0.45851746402966076; dx=-1.3199939118495762E-9 evalInputDelta=0.004033726946323091
    Fitness changed from -0.45448373708333767 to -0.45851746402966076
    Iteration 30 complete. Error: -0.45851746402966076 Total: 78.4993; Orientation: 1.0764; Line Search: 57.8412
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/2fbaf621-d51a-4b66-8e42-bc9d9967e8ce.jpg)
    
    Final threshold in iteration 31: -0.45851746402966076 (> -Infinity) after 2484.669s (< 3600.000s)
    

Returns:

    -0.45851746402966076