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 194.57 seconds (6.442 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: 1579606981539400
    Reset training subject: 1579610033324800
    Adding measurement 58aa10f4 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=41.275682877749205;dx=-0.002510346521034277
    New Minimum: 41.275682877749205 > 41.27328519895673
    WOLFE (weak): th(2.154434690031884)=41.27328519895673; dx=-0.0025104959185952183 evalInputDelta=0.002397678792476654
    New Minimum: 41.27328519895673 > 41.27089066430926
    WOLFE (weak): th(4.308869380063768)=41.27089066430926; dx=-0.0025099005048694967 evalInputDelta=0.004792213439941406
    New Minimum: 41.27089066430926 > 41.26130102202296
    WOLFE (weak): th(12.926608140191302)=41.26130102202296; dx=-0.00251085895079288 evalInputDelta=0.014381855726242065
    New Minimum: 41.26130102202296 > 41.21756528876722
    WOLFE (weak): th(51.70643256076521)=41.21756528876722; dx=-0.0024991232084107993 evalInputDelta=0.058117588981986046
    New Minimum: 41.21756528876722 > 41.000962348654866
    WOLFE (weak): th(258.53216280382605)=41.000962348654866; dx=-0.0023911434261364942 evalInputDelta=0.2747205290943384
    New Minimum: 41.000962348654866 > 39.68125142715871
    END: th(1551.1929768229563)=39.68125142715871; dx=-0.002218473558219541 evalInputDelta=1.5944314505904913
    Fitness changed from 41.275682877749205 to 39.68125142715871
    Iteration 1 complete. Error: 39.68125142715871 Total: 25.3584; Orientation: 0.0292; Line Search: 17.3336
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/a26536f8-8122-4ad4-8dfe-1a37f9cc49a6.jpg)
    
    Adding measurement 2e43c38d to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=39.68125142715871;dx=-0.002200198283835513
    New Minimum: 39.68125142715871 > 36.65022500231862
    END: th(3341.943960201201)=36.65022500231862; dx=-0.0018996695614897816 evalInputDelta=3.0310264248400927
    Fitness changed from 39.68125142715871 to 36.65022500231862
    Iteration 2 complete. Error: 36.65022500231862 Total: 7.5060; Orientation: 0.0046; Line Search: 5.1222
    <a id="p-5"></a>Iteration 2
    <a

...skipping 14047 bytes...

    : 7.515e+03, gradient 3.647e-03, dot -0.731; [66731140-bc5b-4480-ad86-cbfb4ea33b87 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -40.21428070962429, -40.46567341685295, -41.038140784949064, -41.25382372736931
    LBFGS Accumulation History: 3 points
    Removed measurement 4b425577 to history. Total: 4
    th(0)=-41.25382372736931;dx=-1.330254519991742E-5
    Armijo: th(1196908.1611288253)=-36.334287881851196; dx=4.358896346383184E-6 evalInputDelta=-4.919535845518112
    Armijo: th(598454.0805644126)=-40.63082440942526; dx=-1.679699612271305E-6 evalInputDelta=-0.6229993179440498
    New Minimum: -41.25382372736931 > -41.60250136628747
    END: th(199484.69352147088)=-41.60250136628747; dx=-7.64347005270806E-6 evalInputDelta=0.3486776389181614
    Fitness changed from -41.25382372736931 to -41.60250136628747
    Iteration 19 complete. Error: -41.60250136628747 Total: 12.9707; Orientation: 0.0884; Line Search: 9.4890
    Adding measurement 2443135 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.857e+03, gradient 3.444e-03, dot -0.805; [66731140-bc5b-4480-ad86-cbfb4ea33b87 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -40.46567341685295, -41.038140784949064, -41.25382372736931, -41.60250136628747
    LBFGS Accumulation History: 3 points
    Removed measurement 30c19bff to history. Total: 4
    th(0)=-41.60250136628747;dx=-1.1859669037115965E-5
    Armijo: th(429776.74385303544)=-41.511234767735004; dx=-1.3450821609739084E-6 evalInputDelta=-0.09126659855246544
    New Minimum: -41.60250136628747 > -41.819348860532045
    END: th(214888.37192651772)=-41.819348860532045; dx=-6.088344021157811E-6 evalInputDelta=0.2168474942445755
    Fitness changed from -41.60250136628747 to -41.819348860532045
    Iteration 20 complete. Error: -41.819348860532045 Total: 9.9298; Orientation: 0.0895; Line Search: 7.4813
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/baa4433a-41dd-42cb-8147-7e8145e8fdf0.jpg)
    
    Final threshold in iteration 21: -41.819348860532045 (> -Infinity) after 194.553s (< 3600.000s)
    

Returns:

    -41.819348860532045