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

Code from BasicOptimizer.scala:75 executed in 42.10 seconds (1.130 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: 920739168051200
    Reset training subject: 920739927735700
    Adding measurement 5554d201 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.1423731446266174;dx=-4.441585229398378E-5
    New Minimum: 3.1423731446266174 > 3.1423027627170086
    WOLFE (weak): th(2.154434690031884)=3.1423027627170086; dx=-4.4431195728338067E-5 evalInputDelta=7.038190960884094E-5
    New Minimum: 3.1423027627170086 > 3.1422330997884274
    WOLFE (weak): th(4.308869380063768)=3.1422330997884274; dx=-4.4437141109863135E-5 evalInputDelta=1.4004483819007874E-4
    New Minimum: 3.1422330997884274 > 3.141952782869339
    WOLFE (weak): th(12.926608140191302)=3.141952782869339; dx=-4.446386619536938E-5 evalInputDelta=4.203617572784424E-4
    New Minimum: 3.141952782869339 > 3.14069265127182
    WOLFE (weak): th(51.70643256076521)=3.14069265127182; dx=-4.4538223358700445E-5 evalInputDelta=0.0016804933547973633
    New Minimum: 3.14069265127182 > 3.133977308869362
    WOLFE (weak): th(258.53216280382605)=3.133977308869362; dx=-4.520922135888978E-5 evalInputDelta=0.008395835757255554
    New Minimum: 3.133977308869362 > 3.097986329346895
    END: th(1551.1929768229563)=3.097986329346895; dx=-3.352052776038517E-5 evalInputDelta=0.044386815279722214
    Fitness changed from 3.1423731446266174 to 3.097986329346895
    Iteration 1 complete. Error: 3.097986329346895 Total: 6.9560; Orientation: 0.0034; Line Search: 4.9350
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/ab9bb7e7-dc98-4f75-bc3a-4b0327917313.jpg)
    
    Adding measurement 45eff8a2 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=3.097986329346895;dx=-2.994744641771982E-5
    New Minimum: 3.097986329346895 > 3.0307461731135845
    END: th(3341.943960201201)=3.0307461731135845; dx=-2.5621165418128055E-5 evalInputDelta=0.0672401562333107
    Fitness changed from 3.097986329346895 to 3.0307461731135845
    Iteration 2 complete. Error: 3.0307461731135845 Total: 2.0592; Orientation: 0.0041; Line Search: 1.3642
    <a id="p-5"></a>Iteratio

...skipping 9684 bytes...

    ory. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.708e+02, gradient 4.947e-04, dot -0.800; [ae96f9dd-2b68-41b6-91e9-10fa85a9f543 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.5200042724609375, 1.2826932072639465, 1.1566179245710373, 1.0533797889947891
    LBFGS Accumulation History: 3 points
    Removed measurement c216428 to history. Total: 4
    th(0)=1.0533797889947891;dx=-2.4477348230570294E-7
    New Minimum: 1.0533797889947891 > 0.9769341945648193
    END: th(696238.3250419173)=0.9769341945648193; dx=-7.346331344317992E-8 evalInputDelta=0.07644559442996979
    Fitness changed from 1.0533797889947891 to 0.9769341945648193
    Iteration 14 complete. Error: 0.9769341945648193 Total: 2.1941; Orientation: 0.1120; Line Search: 1.3922
    Adding measurement 48dd9268 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.557e+02, gradient 4.543e-04, dot -0.732; [ae96f9dd-2b68-41b6-91e9-10fa85a9f543 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.2826932072639465, 1.1566179245710373, 1.0533797889947891, 0.9769341945648193
    LBFGS Accumulation History: 3 points
    Removed measurement 2f9c2229 to history. Total: 4
    th(0)=0.9769341945648193;dx=-2.0634902030539785E-7
    New Minimum: 0.9769341945648193 > 0.9709478318691254
    WOLF (strong): th(1500000.000000001)=0.9709478318691254; dx=6.005575612471657E-8 evalInputDelta=0.00598636269569397
    New Minimum: 0.9709478318691254 > 0.9342833161354065
    WOLF (strong): th(750000.0000000005)=0.9342833161354065; dx=2.2117309566841414E-9 evalInputDelta=0.04265087842941284
    END: th(250000.00000000015)=0.9466253519058228; dx=-1.1635290181424962E-7 evalInputDelta=0.030308842658996582
    Fitness changed from 0.9769341945648193 to 0.9342833161354065
    Iteration 15 complete. Error: 0.9342833161354065 Total: 3.5159; Orientation: 0.1077; Line Search: 2.7274
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/053debb8-73cb-444d-9134-f81342b80c19.jpg)
    
    Final threshold in iteration 16: 0.9342833161354065 (> -Infinity) after 42.095s (< 1800.000s)
    

Returns:

    0.9342833161354065