Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:88 executed in 396.17 seconds (2.936 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    val trainer = new IterativeTrainer(trainable)
    trainer.setOrientation(orientation())
    trainer.setMonitor(new TrainingMonitor() {
      override def clear(): Unit = trainingMonitor.clear()
  
      override def log(msg: String): Unit = {
        trainingMonitor.log(msg)
        BasicOptimizer.this.log(msg)
      }
  
      override def onStepFail(currentPoint: Step): Boolean = {
        BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
        trainingMonitor.onStepComplete(currentPoint)
        super.onStepComplete(currentPoint)
      }
    })
    trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
    trainer.setMaxIterations(trainingIterations)
    trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
    trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
    val result = trainer.run.asInstanceOf[lang.Double]
    trainer.freeRef()
    result

Logging:

    Reset training subject: 5481103873976
    Reset training subject: 5489170114173
    Adding measurement 79e57bb7 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=7.137339472770691;dx=-2.1862920577222725E-7
    New Minimum: 7.137339472770691 > 7.1373390555381775
    WOLFE (weak): th(2.154434690031884)=7.1373390555381775; dx=-2.1628281718768223E-7 evalInputDelta=4.172325134277344E-7
    New Minimum: 7.1373390555381775 > 7.137338563799858
    WOLFE (weak): th(4.308869380063768)=7.137338563799858; dx=-2.1624121508197058E-7 evalInputDelta=9.08970832824707E-7
    New Minimum: 7.137338563799858 > 7.137336477637291
    WOLFE (weak): th(12.926608140191302)=7.137336477637291; dx=-2.1625658769131982E-7 evalInputDelta=2.995133399963379E-6
    New Minimum: 7.137336477637291 > 7.137327969074249
    WOLFE (weak): th(51.70643256076521)=7.137327969074249; dx=-2.162919621336067E-7 evalInputDelta=1.150369644165039E-5
    New Minimum: 7.137327969074249 > 7.137281060218811
    WOLFE (weak): th(258.53216280382605)=7.137281060218811; dx=-2.1603366595018448E-7 evalInputDelta=5.841255187988281E-5
    New Minimum: 7.137281060218811 > 7.136988252401352
    WOLFE (weak): th(1551.1929768229563)=7.136988252401352; dx=-2.1589619326885723E-7 evalInputDelta=3.5122036933898926E-4
    New Minimum: 7.136988252401352 > 7.134879648685455
    WOLFE (weak): th(10858.350837760694)=7.134879648685455; dx=-2.162399188296573E-7 evalInputDelta=0.0024598240852355957
    New Minimum: 7.134879648685455 > 7.1176773607730865
    WOLFE (weak): th(86866.80670208555)=7.1176773607730865; dx=-2.15697226439154E-7 evalInputDelta=0.01966211199760437
    New Minimum: 7.1176773607730865 > 6.962833806872368
    WOLFE (weak): th(781801.26031877)=6.962833806872368; dx=-2.0991251168358048E-7 evalInputDelta=0.17450566589832306
    New Minimum: 6.962833806872368 > 5.723883658647537
    END: th(7818012.6031877)=5.723883658647537; dx=-1.4051583035173356E-7 evalInputDelta=1.4134558141231537
    Fitness changed from 7.137339472770691 to 5.723883658647537
    Iteration 1 complete. Error: 5.723883658647537 Total: 117.14

...skipping 5883 bytes...

    o history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.871e+03, gradient 1.175e-04, dot -0.255; [fb3d1741-7a47-497f-a386-67c2c2ce7f72 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.3470402956008911, 4.193260937929153, 5.723883658647537, 7.137339472770691
    LBFGS Accumulation History: 3 points
    Removed measurement 70ab4da1 to history. Total: 3
    th(0)=-0.3470402956008911;dx=-1.3778203997060342E-8
    Armijo: th(2.268000000000001E8)=1.0507951378822327; dx=4.123569001285534E-9 evalInputDelta=-1.3978354334831238
    New Minimum: -0.3470402956008911 > -0.4387061893939972
    WOLF (strong): th(1.1340000000000004E8)=-0.4387061893939972; dx=6.515507215376725E-10 evalInputDelta=0.09166589379310608
    New Minimum: -0.4387061893939972 > -0.6815089583396912
    END: th(3.7800000000000015E7)=-0.6815089583396912; dx=-7.2991994174517064E-9 evalInputDelta=0.33446866273880005
    Fitness changed from -0.3470402956008911 to -0.6815089583396912
    Iteration 9 complete. Error: -0.6815089583396912 Total: 41.5817; Orientation: 0.8426; Line Search: 32.7408
    Adding measurement 3331a36c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.301e+03, gradient 8.911e-05, dot -0.285; [fb3d1741-7a47-497f-a386-67c2c2ce7f72 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.6815089583396912, 4.193260937929153, 5.723883658647537, 7.137339472770691
    LBFGS Accumulation History: 3 points
    Removed measurement 3331a36c to history. Total: 3
    th(0)=-0.6815089583396912;dx=-7.928239493947123E-9
    New Minimum: -0.6815089583396912 > -0.8660747855901718
    END: th(8.143763128320524E7)=-0.8660747855901718; dx=-2.786460530430301E-9 evalInputDelta=0.18456582725048065
    Fitness changed from -0.6815089583396912 to -0.8660747855901718
    Iteration 10 complete. Error: -0.8660747855901718 Total: 25.9287; Orientation: 0.8256; Line Search: 16.5784
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/edf6e52b-12e9-494d-b600-0dffbe8d6e96.jpg)
    
    Final threshold in iteration 11: -0.8660747855901718 (> -Infinity) after 396.165s (< 3600.000s)
    

Returns:

    -0.8660747855901718