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

Code from BasicOptimizer.scala:75 executed in 124.78 seconds (2.557 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: 900692740365300
    Reset training subject: 900693922343400
    Adding measurement 6872201 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.1423641741275787;dx=-1.3417890650170378E-5
    New Minimum: 3.1423641741275787 > 3.1423402577638626
    WOLFE (weak): th(2.154434690031884)=3.1423402577638626; dx=-1.3417769262153967E-5 evalInputDelta=2.3916363716125488E-5
    New Minimum: 3.1423402577638626 > 3.142315872013569
    WOLFE (weak): th(4.308869380063768)=3.142315872013569; dx=-1.3417471278969436E-5 evalInputDelta=4.830211400985718E-5
    New Minimum: 3.142315872013569 > 3.142219752073288
    WOLFE (weak): th(12.926608140191302)=3.142219752073288; dx=-1.3417321506937718E-5 evalInputDelta=1.4442205429077148E-4
    New Minimum: 3.142219752073288 > 3.1417855098843575
    WOLFE (weak): th(51.70643256076521)=3.1417855098843575; dx=-1.3413553431887219E-5 evalInputDelta=5.78664243221283E-4
    New Minimum: 3.1417855098843575 > 3.139474868774414
    WOLFE (weak): th(258.53216280382605)=3.139474868774414; dx=-1.3385366574056664E-5 evalInputDelta=0.002889305353164673
    New Minimum: 3.139474868774414 > 3.125110499560833
    WOLFE (weak): th(1551.1929768229563)=3.125110499560833; dx=-1.326486278009207E-5 evalInputDelta=0.017253674566745758
    New Minimum: 3.125110499560833 > 3.0271515250205994
    WOLFE (weak): th(10858.350837760694)=3.0271515250205994; dx=-1.2466522776397942E-5 evalInputDelta=0.11521264910697937
    New Minimum: 3.0271515250205994 > 2.427385851740837
    END: th(86866.80670208555)=2.427385851740837; dx=-7.181763135627171E-6 evalInputDelta=0.7149783223867416
    Fitness changed from 3.1423641741275787 to 2.427385851740837
    Iteration 1 complete. Error: 2.427385851740837 Total: 14.3824; Orientation: 0.0142; Line Search: 10.9844
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/722fc22e-6742-4f69-8e8f-a82d0bd5bfb3.jpg)
    
    Adding measurement 5acc6ca1 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=2.427385851740837;dx=-5.313045908480787E-6
    New Mi

...skipping 19551 bytes...

    dd to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.924e+03, gradient 4.134e-05, dot -0.901; [637cb549-6949-4aa4-aaee-b5ba3466705b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.20652027428150177, -0.21533294022083282, -0.22181667387485504, -0.22873565554618835
    LBFGS Accumulation History: 3 points
    Removed measurement 18482805 to history. Total: 4
    th(0)=-0.22873565554618835;dx=-1.709278917981944E-9
    New Minimum: -0.22873565554618835 > -0.23826828598976135
    END: th(1.6203703703703722E7)=-0.23826828598976135; dx=-9.663819593970655E-10 evalInputDelta=0.009532630443572998
    Fitness changed from -0.22873565554618835 to -0.23826828598976135
    Iteration 24 complete. Error: -0.23826828598976135 Total: 3.7554; Orientation: 0.4199; Line Search: 2.2532
    Adding measurement 47fe4c3e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.796e+03, gradient 4.936e-05, dot -0.675; [637cb549-6949-4aa4-aaee-b5ba3466705b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.21533294022083282, -0.22181667387485504, -0.22873565554618835, -0.23826828598976135
    LBFGS Accumulation History: 3 points
    Removed measurement 30b35687 to history. Total: 4
    th(0)=-0.23826828598976135;dx=-2.4359468342530254E-9
    Armijo: th(3.4909821366257414E7)=-0.20425306260585785; dx=2.000854975264818E-9 evalInputDelta=-0.0340152233839035
    Armijo: th(1.7454910683128707E7)=-0.23672014474868774; dx=7.74329259417911E-10 evalInputDelta=-0.0015481412410736084
    New Minimum: -0.23826828598976135 > -0.2436801642179489
    END: th(5818303.561042902)=-0.2436801642179489; dx=-8.429520101706714E-10 evalInputDelta=0.005411878228187561
    Fitness changed from -0.23826828598976135 to -0.2436801642179489
    Iteration 25 complete. Error: -0.2436801642179489 Total: 6.1140; Orientation: 0.4301; Line Search: 4.5924
    <a id="p-19"></a>Iteration 25
    <a id="p-18"></a>![Iteration 25](etc/4c8ea21e-aaba-48b8-8874-300bdc5556ad.jpg)
    
    Final threshold in iteration 26: -0.2436801642179489 (> -Infinity) after 124.783s (< 3600.000s)
    

Returns:

    -0.2436801642179489