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 3671.89 seconds (19.498 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: 999376248422500
    Reset training subject: 999430089162300
    Adding measurement 3936424d to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=6.280331021429099;dx=-1.7082752350488668E-7
    New Minimum: 6.280331021429099 > 6.280330428461529
    WOLFE (weak): th(2.154434690031884)=6.280330428461529; dx=-1.7059446814249898E-7 evalInputDelta=5.929675701565884E-7
    New Minimum: 6.280330428461529 > 6.280329892019726
    WOLFE (weak): th(4.308869380063768)=6.280329892019726; dx=-1.7059248637730078E-7 evalInputDelta=1.129409373135104E-6
    New Minimum: 6.280329892019726 > 6.280328237990833
    WOLFE (weak): th(12.926608140191302)=6.280328237990833; dx=-1.7059097252861029E-7 evalInputDelta=2.783438265652194E-6
    New Minimum: 6.280328237990833 > 6.280320013689494
    WOLFE (weak): th(51.70643256076521)=6.280320013689494; dx=-1.7060319597010252E-7 evalInputDelta=1.1007739605162215E-5
    New Minimum: 6.280320013689494 > 6.280276323918345
    WOLFE (weak): th(258.53216280382605)=6.280276323918345; dx=-1.7063783781373152E-7 evalInputDelta=5.469751075359852E-5
    New Minimum: 6.280276323918345 > 6.280003202089437
    WOLFE (weak): th(1551.1929768229563)=6.280003202089437; dx=-1.7061963343459659E-7 evalInputDelta=3.278193396614171E-4
    New Minimum: 6.280003202089437 > 6.278038778670481
    WOLFE (weak): th(10858.350837760694)=6.278038778670481; dx=-1.705239097198834E-7 evalInputDelta=0.002292242758617391
    New Minimum: 6.278038778670481 > 6.262033420554894
    WOLFE (weak): th(86866.80670208555)=6.262033420554894; dx=-1.6997475643678027E-7 evalInputDelta=0.018297600874205067
    New Minimum: 6.262033420554894 > 6.119357560996491
    WOLFE (weak): th(781801.26031877)=6.119357560996491; dx=-1.629502092246114E-7 evalInputDelta=0.16097346043260785
    New Minimum: 6.119357560996491 > 5.2358621910322025
    END: th(7818012.6031877)=5.2358621910322025; dx=-6.314432015369115E-8 evalInputDelta=1.0444688303968963
    Fitness changed from 6.280331021429099 to 5.2358621910322025
    Iteration 1 complete. Error: 5

...skipping 10828 bytes...

    3899095 to 3.190127198907757
    Iteration 13 complete. Error: 3.190127198907757 Total: 269.7555; Orientation: 1.8094; Line Search: 214.3870
    Adding measurement 2a266b8d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.655e+03, gradient 9.068e-05, dot -0.811; [29e23296-3961-42ae-b436-f98f44a66191 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.409732256388028, 3.3044536144084935, 3.2579040183899095, 3.190127198907757
    LBFGS Accumulation History: 3 points
    Removed measurement 11c437ab to history. Total: 4
    th(0)=3.190127198907757;dx=-8.214915221697593E-9
    New Minimum: 3.190127198907757 > 3.1462655186746145
    END: th(1.6245560917644737E7)=3.1462655186746145; dx=-4.1528189935368866E-9 evalInputDelta=0.04386168023314241
    Fitness changed from 3.190127198907757 to 3.1462655186746145
    Iteration 14 complete. Error: 3.1462655186746145 Total: 161.7023; Orientation: 1.8326; Line Search: 106.8680
    Adding measurement 5bfb383c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.730e+03, gradient 9.837e-05, dot -0.709; [29e23296-3961-42ae-b436-f98f44a66191 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.3044536144084935, 3.2579040183899095, 3.190127198907757, 3.1462655186746145
    LBFGS Accumulation History: 3 points
    Removed measurement 69c5ed14 to history. Total: 4
    th(0)=3.1462655186746145;dx=-9.672486553963015E-9
    Armijo: th(3.500000000000002E7)=3.234994365586313; dx=7.711173747034338E-10 evalInputDelta=-0.08872884691169869
    New Minimum: 3.1462655186746145 > 3.118982630384573
    END: th(1.750000000000001E7)=3.118982630384573; dx=-2.2643039334081848E-9 evalInputDelta=0.02728288829004155
    Fitness changed from 3.1462655186746145 to 3.118982630384573
    Iteration 15 complete. Error: 3.118982630384573 Total: 216.0824; Orientation: 1.8568; Line Search: 160.6989
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/0096ae48-5bbe-452f-8f4a-9eec44bf0db5.jpg)
    
    Final threshold in iteration 15: 3.118982630384573 (> -Infinity) after 3671.881s (< 3600.000s)
    

Returns:

    3.118982630384573