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 982.03 seconds (11.775 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: 1164387510097100
    Reset training subject: 1164395555587700
    Adding measurement 4fc71437 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=5.309877611586407;dx=-3.163106233801326E-5
    New Minimum: 5.309877611586407 > 5.309847776672496
    WOLFE (weak): th(2.154434690031884)=5.309847776672496; dx=-3.163086667674949E-5 evalInputDelta=2.9834913910953276E-5
    New Minimum: 5.309847776672496 > 5.309818008183914
    WOLFE (weak): th(4.308869380063768)=5.309818008183914; dx=-3.163100504837298E-5 evalInputDelta=5.960340249266949E-5
    New Minimum: 5.309818008183914 > 5.3096992238717196
    WOLFE (weak): th(12.926608140191302)=5.3096992238717196; dx=-3.163022487309024E-5 evalInputDelta=1.7838771468703385E-4
    New Minimum: 5.3096992238717196 > 5.309163829113366
    WOLFE (weak): th(51.70643256076521)=5.309163829113366; dx=-3.163064625424733E-5 evalInputDelta=7.137824730403253E-4
    New Minimum: 5.309163829113366 > 5.306309227306738
    WOLFE (weak): th(258.53216280382605)=5.306309227306738; dx=-3.1629724387970735E-5 evalInputDelta=0.00356838427966899
    New Minimum: 5.306309227306738 > 5.28852886629357
    WOLFE (weak): th(1551.1929768229563)=5.28852886629357; dx=-3.137532751025563E-5 evalInputDelta=0.021348745292836924
    New Minimum: 5.28852886629357 > 5.167215155115266
    WOLFE (weak): th(10858.350837760694)=5.167215155115266; dx=-2.8841348024704918E-5 evalInputDelta=0.1426624564711405
    New Minimum: 5.167215155115266 > 4.4189139504395785
    END: th(86866.80670208555)=4.4189139504395785; dx=-1.7702502125002335E-5 evalInputDelta=0.8909636611468281
    Fitness changed from 5.309877611586407 to 4.4189139504395785
    Iteration 1 complete. Error: 4.4189139504395785 Total: 98.3125; Orientation: 0.0074; Line Search: 73.7544
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/f3aae360-b8b1-4397-b6d8-09fc2e40a78e.jpg)
    
    Adding measurement 671f545b to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=4.4189139504395785;dx=-1.3401867929058733E-5
    New Minimum: 4

...skipping 24140 bytes...

    . Error: -0.09737120078925587 Total: 24.6321; Orientation: 0.2103; Line Search: 16.3194
    Adding measurement 472dbaf5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.234e+03, gradient 2.195e-04, dot -0.763; [e76c74bc-a187-4b31-bb30-ad4209110af3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.033320983652291525, -0.051267614823782504, -0.07650362810432909, -0.09737120078925587
    LBFGS Accumulation History: 3 points
    Removed measurement 105fe81e to history. Total: 4
    th(0)=-0.09737120078925587;dx=-4.818670606754785E-8
    Armijo: th(5222981.262102864)=-0.08662302600780514; dx=8.215545289822962E-9 evalInputDelta=-0.010748174781450737
    New Minimum: -0.09737120078925587 > -0.11178562641570022
    END: th(2611490.631051432)=-0.11178562641570022; dx=-1.0524069876687274E-8 evalInputDelta=0.01441442562644435
    Fitness changed from -0.09737120078925587 to -0.11178562641570022
    Iteration 29 complete. Error: -0.11178562641570022 Total: 32.8014; Orientation: 0.2021; Line Search: 24.3764
    Adding measurement ba27ce6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.189e+03, gradient 2.543e-04, dot -0.630; [e76c74bc-a187-4b31-bb30-ad4209110af3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.051267614823782504, -0.07650362810432909, -0.09737120078925587, -0.11178562641570022
    LBFGS Accumulation History: 3 points
    Removed measurement 1b26fac2 to history. Total: 4
    th(0)=-0.11178562641570022;dx=-6.466040653491082E-8
    New Minimum: -0.11178562641570022 > -0.11461624597481812
    END: th(5626286.00823046)=-0.11461624597481812; dx=-9.100238942876059E-9 evalInputDelta=0.0028306195591178973
    Fitness changed from -0.11178562641570022 to -0.11461624597481812
    Iteration 30 complete. Error: -0.11461624597481812 Total: 24.5451; Orientation: 0.2006; Line Search: 16.2462
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/97f47228-18c1-45cd-9aef-fd45cb61c12c.jpg)
    
    Final threshold in iteration 31: -0.11461624597481812 (> -Infinity) after 982.027s (< 3600.000s)
    

Returns:

    -0.11461624597481812