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 2117.02 seconds (12.282 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: 748632305109400
    Reset training subject: 748649024515300
    Adding measurement 69ffdaa8 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.108326859772205;dx=-1.2596946844771114E-6
    New Minimum: 8.108326859772205 > 8.108323462307453
    WOLFE (weak): th(2.154434690031884)=8.108323462307453; dx=-1.2459016723354553E-6 evalInputDelta=3.3974647521972656E-6
    New Minimum: 8.108323462307453 > 8.108318500220776
    WOLFE (weak): th(4.308869380063768)=8.108318500220776; dx=-1.2459183153935305E-6 evalInputDelta=8.359551429748535E-6
    New Minimum: 8.108318500220776 > 8.10830195248127
    WOLFE (weak): th(12.926608140191302)=8.10830195248127; dx=-1.2459305833021749E-6 evalInputDelta=2.4907290935516357E-5
    New Minimum: 8.10830195248127 > 8.108226627111435
    WOLFE (weak): th(51.70643256076521)=8.108226627111435; dx=-1.24587802236949E-6 evalInputDelta=1.0023266077041626E-4
    New Minimum: 8.108226627111435 > 8.107825756072998
    WOLFE (weak): th(258.53216280382605)=8.107825756072998; dx=-1.2453318402347036E-6 evalInputDelta=5.011036992073059E-4
    New Minimum: 8.107825756072998 > 8.10532482713461
    WOLFE (weak): th(1551.1929768229563)=8.10532482713461; dx=-1.2414677213850076E-6 evalInputDelta=0.0030020326375961304
    New Minimum: 8.10532482713461 > 8.087516248226166
    WOLFE (weak): th(10858.350837760694)=8.087516248226166; dx=-1.2157510767005916E-6 evalInputDelta=0.02081061154603958
    New Minimum: 8.087516248226166 > 7.958045907318592
    END: th(86866.80670208555)=7.958045907318592; dx=-9.168628203994839E-7 evalInputDelta=0.15028095245361328
    Fitness changed from 8.108326859772205 to 7.958045907318592
    Iteration 1 complete. Error: 7.958045907318592 Total: 199.9673; Orientation: 0.0182; Line Search: 149.2964
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/e5fc9157-88a9-4468-ba50-9343fdc70325.jpg)
    
    Adding measurement 590013c7 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=7.958045907318592;dx=-9.628518711103457E-7
    New Minimum: 7.958

...skipping 24824 bytes...

    eration 28 complete. Error: 5.520019695162773 Total: 66.6890; Orientation: 0.5005; Line Search: 49.4746
    Adding measurement 58636b50 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.810e+02, gradient 6.012e-04, dot -0.640; [b1e78110-6ce3-4d1e-b4bd-1c187b54aedc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 5.62905378639698, 5.5994826927781105, 5.548817180097103, 5.520019695162773
    LBFGS Accumulation History: 3 points
    Removed measurement 139089a4 to history. Total: 4
    th(0)=5.520019695162773;dx=-3.612967857324022E-7
    New Minimum: 5.520019695162773 > 5.48909480124712
    WOLF (strong): th(183620.43499580378)=5.48909480124712; dx=1.206497942751391E-7 evalInputDelta=0.03092489391565323
    New Minimum: 5.48909480124712 > 5.486442871391773
    END: th(91810.21749790189)=5.486442871391773; dx=-9.321487589495732E-8 evalInputDelta=0.03357682377099991
    Fitness changed from 5.520019695162773 to 5.486442871391773
    Iteration 29 complete. Error: 5.486442871391773 Total: 66.5659; Orientation: 0.5042; Line Search: 49.7321
    Adding measurement ff2266c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.725e+02, gradient 4.204e-04, dot -0.834; [b1e78110-6ce3-4d1e-b4bd-1c187b54aedc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 5.5994826927781105, 5.548817180097103, 5.520019695162773, 5.486442871391773
    LBFGS Accumulation History: 3 points
    Removed measurement 38fb151a to history. Total: 4
    th(0)=5.486442871391773;dx=-1.766240399499155E-7
    New Minimum: 5.486442871391773 > 5.4545304998755455
    END: th(197799.1174768521)=5.4545304998755455; dx=-4.99049746587381E-8 evalInputDelta=0.03191237151622772
    Fitness changed from 5.486442871391773 to 5.4545304998755455
    Iteration 30 complete. Error: 5.4545304998755455 Total: 50.9161; Orientation: 0.5345; Line Search: 33.5561
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/b4472550-186e-4119-80ec-3b06c156689b.jpg)
    
    Final threshold in iteration 31: 5.4545304998755455 (> -Infinity) after 2117.023s (< 3600.000s)
    

Returns:

    5.4545304998755455