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 33.90 seconds (0.499 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: 904019134754400
    Reset training subject: 904019624594100
    Adding measurement 67bb4dcd to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=2.0938375294208527;dx=-1.2037602631068619E-7
    New Minimum: 2.0938375294208527 > 2.0938375145196915
    WOLFE (weak): th(2.154434690031884)=2.0938375145196915; dx=-1.2037606672359591E-7 evalInputDelta=1.4901161193847656E-8
    New Minimum: 2.0938375145196915 > 2.093837261199951
    WOLFE (weak): th(4.308869380063768)=2.093837261199951; dx=-1.2037611181322868E-7 evalInputDelta=2.682209014892578E-7
    New Minimum: 2.093837261199951 > 2.0938362777233124
    WOLFE (weak): th(12.926608140191302)=2.0938362777233124; dx=-1.2037628133328442E-7 evalInputDelta=1.2516975402832031E-6
    New Minimum: 2.0938362777233124 > 2.0938316583633423
    WOLFE (weak): th(51.70643256076521)=2.0938316583633423; dx=-1.2037732917939813E-7 evalInputDelta=5.8710575103759766E-6
    New Minimum: 2.0938316583633423 > 2.0938067734241486
    WOLFE (weak): th(258.53216280382605)=2.0938067734241486; dx=-1.2037613663902832E-7 evalInputDelta=3.075599670410156E-5
    New Minimum: 2.0938067734241486 > 2.0936511754989624
    WOLFE (weak): th(1551.1929768229563)=2.0936511754989624; dx=-1.2039308841503898E-7 evalInputDelta=1.863539218902588E-4
    New Minimum: 2.0936511754989624 > 2.092529848217964
    WOLFE (weak): th(10858.350837760694)=2.092529848217964; dx=-1.205550106488161E-7 evalInputDelta=0.0013076812028884888
    New Minimum: 2.092529848217964 > 2.0833326131105423
    WOLFE (weak): th(86866.80670208555)=2.0833326131105423; dx=-1.214589543681535E-7 evalInputDelta=0.010504916310310364
    New Minimum: 2.0833326131105423 > 1.9966578036546707
    WOLFE (weak): th(781801.26031877)=1.9966578036546707; dx=-1.2703819335374615E-7 evalInputDelta=0.09717972576618195
    New Minimum: 1.9966578036546707 > 1.1764203310012817
    END: th(7818012.6031877)=1.1764203310012817; dx=-1.0082619798774127E-7 evalInputDelta=0.9174171984195709
    Fitness changed from 2.0938375294208527 to 1.1764203310012817
    It

...skipping 10831 bytes...

    -11 evalInputDelta=7.243305444717407E-4
    Fitness changed from -0.3834012746810913 to -0.38412560522556305
    Iteration 13 complete. Error: -0.38412560522556305 Total: 1.5503; Orientation: 0.1055; Line Search: 0.9884
    Adding measurement 30bbcf91 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.169e+03, gradient 6.459e-06, dot -0.951; [471b9b8b-e417-49af-a067-439cab730a25 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.3795454166829586, -0.38296516612172127, -0.3834012746810913, -0.38412560522556305
    LBFGS Accumulation History: 3 points
    Removed measurement 481b2f10 to history. Total: 4
    th(0)=-0.38412560522556305;dx=-4.1720247445980657E-11
    New Minimum: -0.38412560522556305 > -0.3854697085916996
    END: th(3.655251206470066E7)=-0.3854697085916996; dx=-3.475531962978522E-11 evalInputDelta=0.001344103366136551
    Fitness changed from -0.38412560522556305 to -0.3854697085916996
    Iteration 14 complete. Error: -0.3854697085916996 Total: 1.5757; Orientation: 0.1073; Line Search: 0.9895
    Adding measurement 7a65a360 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.841e+03, gradient 5.969e-06, dot -0.956; [471b9b8b-e417-49af-a067-439cab730a25 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.38296516612172127, -0.3834012746810913, -0.38412560522556305, -0.3854697085916996
    LBFGS Accumulation History: 3 points
    Removed measurement 1b4872bc to history. Total: 4
    th(0)=-0.3854697085916996;dx=-3.5629231614256354E-11
    New Minimum: -0.3854697085916996 > -0.3876712704077363
    END: th(7.875000000000006E7)=-0.3876712704077363; dx=-2.3072439408818896E-11 evalInputDelta=0.002201561816036701
    Fitness changed from -0.3854697085916996 to -0.3876712704077363
    Iteration 15 complete. Error: -0.3876712704077363 Total: 1.5670; Orientation: 0.1048; Line Search: 0.9839
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/4e583db5-1a20-4644-a19d-df5b187f8fa3.jpg)
    
    Final threshold in iteration 16: -0.3876712704077363 (> -Infinity) after 33.898s (< 1800.000s)
    

Returns:

    -0.3876712704077363