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

Iteration 35 Iteration 35

Iteration 40 Iteration 40

Iteration 45 Iteration 45

Iteration 50 Iteration 50

Code from BasicOptimizer.scala:75 executed in 352.42 seconds (4.946 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: 1110702610271
    Reset training subject: 1112062395048
    Adding measurement 60a0aad3 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.7338700971103169;dx=-5.63265477133234E-10
    New Minimum: 0.7338700971103169 > 0.7338700958967982
    WOLFE (weak): th(2.154434690031884)=0.7338700958967982; dx=-5.632654738393214E-10 evalInputDelta=1.2135187299477934E-9
    New Minimum: 0.7338700958967982 > 0.7338700946832796
    WOLFE (weak): th(4.308869380063768)=0.7338700946832796; dx=-5.632654705454087E-10 evalInputDelta=2.4270373488732844E-9
    New Minimum: 0.7338700946832796 > 0.7338700898292041
    WOLFE (weak): th(12.926608140191302)=0.7338700898292041; dx=-5.632659540235703E-10 evalInputDelta=7.28111282377597E-9
    New Minimum: 0.7338700898292041 > 0.7338700679858503
    WOLFE (weak): th(51.70643256076521)=0.7338700679858503; dx=-5.632658947331493E-10 evalInputDelta=2.912446661618162E-8
    New Minimum: 0.7338700679858503 > 0.7338699514879788
    WOLFE (weak): th(258.53216280382605)=0.7338699514879788; dx=-5.632656516253601E-10 evalInputDelta=1.4562233807691172E-7
    New Minimum: 0.7338699514879788 > 0.7338692233740105
    WOLFE (weak): th(1551.1929768229563)=0.7338692233740105; dx=-5.632705301901564E-10 evalInputDelta=8.737363064170722E-7
    New Minimum: 0.7338692233740105 > 0.7338639807221873
    WOLFE (weak): th(10858.350837760694)=0.7338639807221873; dx=-5.633128045534846E-10 evalInputDelta=6.1163881296399936E-6
    New Minimum: 0.7338639807221873 > 0.7338211483698112
    WOLFE (weak): th(86866.80670208555)=0.7338211483698112; dx=-5.63714408699089E-10 evalInputDelta=4.8948740505760924E-5
    New Minimum: 0.7338211483698112 > 0.7334281438145797
    WOLFE (weak): th(781801.26031877)=0.7334281438145797; dx=-5.673680418855998E-10 evalInputDelta=4.4195329573726294E-4
    New Minimum: 0.7334281438145797 > 0.7293340439661021
    WOLFE (weak): th(7818012.6031877)=0.7293340439661021; dx=-5.937365598597873E-10 evalInputDelta=0.004536053144214791
    New Minimum: 0.7293340439661021 > 0.6830528872710409
    WOLFE (weak): th(8.5998

...skipping 43214 bytes...

    ne Search: 4.1441
    Adding measurement 1da204ee to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.680e+03, gradient 2.229e-06, dot -0.692; [728937bc-fb38-4212-a781-952250fb4408 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.3820092720019275, 0.3807546637138246, 0.3793233171068313, 0.3784283971706046
    LBFGS Accumulation History: 3 points
    Removed measurement 62b97ae3 to history. Total: 4
    th(0)=0.3784283971706046;dx=-4.9683333763857885E-12
    New Minimum: 0.3784283971706046 > 0.3775447278809607
    WOLF (strong): th(4.166666666666667E8)=0.3775447278809607; dx=5.585959229328872E-13 evalInputDelta=8.836692896438958E-4
    END: th(2.0833333333333334E8)=0.37766407275775954; dx=-2.020936364321038E-12 evalInputDelta=7.643244128450744E-4
    Fitness changed from 0.3784283971706046 to 0.3775447278809607
    Iteration 49 complete. Error: 0.3775447278809607 Total: 6.9000; Orientation: 1.6000; Line Search: 4.0953
    Adding measurement 69791740 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.177e+03, gradient 2.382e-06, dot -0.664; [728937bc-fb38-4212-a781-952250fb4408 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.3807546637138246, 0.3793233171068313, 0.3784283971706046, 0.3775447278809607
    LBFGS Accumulation History: 3 points
    Removed measurement 7a08a8ca to history. Total: 4
    th(0)=0.3775447278809607;dx=-5.676049517053346E-12
    New Minimum: 0.3775447278809607 > 0.37663816853245935
    WOLF (strong): th(4.4884056042330915E8)=0.37663816853245935; dx=1.394542769333816E-12 evalInputDelta=9.065593485013679E-4
    END: th(2.2442028021165457E8)=0.3766428748511491; dx=-1.8768301063138577E-12 evalInputDelta=9.018530298116056E-4
    Fitness changed from 0.3775447278809607 to 0.37663816853245935
    Iteration 50 complete. Error: 0.37663816853245935 Total: 6.8749; Orientation: 1.5939; Line Search: 4.0815
    <a id="p-29"></a>Iteration 50
    <a id="p-28"></a>![Iteration 50](etc/efd4ebc6-000d-4fad-aa15-0ebc4e6a2f9d.jpg)
    
    Final threshold in iteration 51: 0.37663816853245935 (> -Infinity) after 352.423s (< 3600.000s)
    

Returns:

    0.37663816853245935