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 2448.60 seconds (26.113 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: 1585088987838600
    Reset training subject: 1585118413486700
    Adding measurement 40f15786 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=5.960904218176087;dx=-2.9684453707852714E-6
    New Minimum: 5.960904218176087 > 5.960903777084364
    WOLFE (weak): th(2.154434690031884)=5.960903777084364; dx=-2.9642201702117934E-6 evalInputDelta=4.4109172314676925E-7
    New Minimum: 5.960903777084364 > 5.960902830832834
    WOLFE (weak): th(4.308869380063768)=5.960902830832834; dx=-2.9642226856522217E-6 evalInputDelta=1.3873432536115615E-6
    New Minimum: 5.960902830832834 > 5.960895293089979
    WOLFE (weak): th(12.926608140191302)=5.960895293089979; dx=-2.964226779410806E-6 evalInputDelta=8.925086108391156E-6
    New Minimum: 5.960895293089979 > 5.9608721675367695
    WOLFE (weak): th(51.70643256076521)=5.9608721675367695; dx=-2.96421390097074E-6 evalInputDelta=3.205063931766006E-5
    New Minimum: 5.9608721675367695 > 5.960746152646081
    WOLFE (weak): th(258.53216280382605)=5.960746152646081; dx=-2.9639006906636066E-6 evalInputDelta=1.580655300061906E-4
    New Minimum: 5.960746152646081 > 5.9599572947527255
    WOLFE (weak): th(1551.1929768229563)=5.9599572947527255; dx=-2.963158278283975E-6 evalInputDelta=9.469234233616675E-4
    New Minimum: 5.9599572947527255 > 5.9542878592259365
    WOLFE (weak): th(10858.350837760694)=5.9542878592259365; dx=-2.9547345219439255E-6 evalInputDelta=0.006616358950150669
    New Minimum: 5.9542878592259365 > 5.908494993187852
    WOLFE (weak): th(86866.80670208555)=5.908494993187852; dx=-2.878025696526743E-6 evalInputDelta=0.05240922498823508
    New Minimum: 5.908494993187852 > 5.530134520555574
    END: th(781801.26031877)=5.530134520555574; dx=-2.2757713943658374E-6 evalInputDelta=0.4307696976205131
    Fitness changed from 5.960904218176087 to 5.530134520555574
    Iteration 1 complete. Error: 5.530134520555574 Total: 370.1787; Orientation: 0.0831; Line Search: 284.0019
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/9a6fb98e-861b-4ab9-9

...skipping 15139 bytes...

     to 1.1981052711988969
    Iteration 18 complete. Error: 1.1981052711988969 Total: 144.7130; Orientation: 2.3663; Line Search: 114.4524
    Adding measurement 3c577368 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.150e+03, gradient 4.156e-04, dot -0.601; [65d41a24-0e8c-436e-ace3-101e4d088e6c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.2503354024270832, 1.2304434915546965, 1.2122467915565078, 1.1981052711988969
    LBFGS Accumulation History: 3 points
    Removed measurement 57063e08 to history. Total: 4
    th(0)=1.1981052711988969;dx=-1.7271450689748933E-7
    New Minimum: 1.1981052711988969 > 1.1760268080238678
    WOLF (strong): th(2094589.2819754435)=1.1760268080238678; dx=7.759240778052135E-10 evalInputDelta=0.02207846317502904
    END: th(1047294.6409877217)=1.1809297027942627; dx=-8.92553323024988E-8 evalInputDelta=0.01717556840463419
    Fitness changed from 1.1981052711988969 to 1.1760268080238678
    Iteration 19 complete. Error: 1.1760268080238678 Total: 116.2118; Orientation: 2.3930; Line Search: 85.3140
    Adding measurement 57edfa89 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.375e+03, gradient 2.945e-04, dot -0.773; [65d41a24-0e8c-436e-ace3-101e4d088e6c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.2304434915546965, 1.2122467915565078, 1.1981052711988969, 1.1760268080238678
    LBFGS Accumulation History: 3 points
    Removed measurement 7fa2473a to history. Total: 4
    th(0)=1.1760268080238678;dx=-8.675285198008149E-8
    New Minimum: 1.1760268080238678 > 1.160404215839815
    END: th(2256327.9052284355)=1.160404215839815; dx=-2.7804924051408774E-8 evalInputDelta=0.01562259218405293
    Fitness changed from 1.1760268080238678 to 1.160404215839815
    Iteration 20 complete. Error: 1.160404215839815 Total: 87.5609; Orientation: 2.3859; Line Search: 57.1703
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/04fe4089-e88b-4dbd-831c-d13c7445229f.jpg)
    
    Final threshold in iteration 21: 1.160404215839815 (> -Infinity) after 2448.602s (< 5400.000s)
    

Returns:

    1.160404215839815