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 978.04 seconds (6.759 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: 11954304465028
    Reset training subject: 11975183461102
    Adding measurement 2a0715d3 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.3119324147701263;dx=-9.695872834462378E-8
    New Minimum: 3.3119324147701263 > 3.3119319677352905
    WOLFE (weak): th(2.154434690031884)=3.3119319677352905; dx=-9.695347412784626E-8 evalInputDelta=4.470348358154297E-7
    New Minimum: 3.3119319677352905 > 3.3119316399097443
    WOLFE (weak): th(4.308869380063768)=3.3119316399097443; dx=-9.695023172417298E-8 evalInputDelta=7.748603820800781E-7
    New Minimum: 3.3119316399097443 > 3.3119305670261383
    WOLFE (weak): th(12.926608140191302)=3.3119305670261383; dx=-9.695193961162086E-8 evalInputDelta=1.8477439880371094E-6
    New Minimum: 3.3119305670261383 > 3.3119245171546936
    WOLFE (weak): th(51.70643256076521)=3.3119245171546936; dx=-9.694678083626659E-8 evalInputDelta=7.897615432739258E-6
    New Minimum: 3.3119245171546936 > 3.3118935227394104
    WOLFE (weak): th(258.53216280382605)=3.3118935227394104; dx=-9.695456814248564E-8 evalInputDelta=3.889203071594238E-5
    New Minimum: 3.3118935227394104 > 3.311699241399765
    WOLFE (weak): th(1551.1929768229563)=3.311699241399765; dx=-9.694677177652732E-8 evalInputDelta=2.3317337036132812E-4
    New Minimum: 3.311699241399765 > 3.3103009313344955
    WOLFE (weak): th(10858.350837760694)=3.3103009313344955; dx=-9.688508226573952E-8 evalInputDelta=0.0016314834356307983
    New Minimum: 3.3103009313344955 > 3.2989064753055573
    WOLFE (weak): th(86866.80670208555)=3.2989064753055573; dx=-9.648771272627347E-8 evalInputDelta=0.013025939464569092
    New Minimum: 3.2989064753055573 > 3.1968957483768463
    WOLFE (weak): th(781801.26031877)=3.1968957483768463; dx=-9.266325331897494E-8 evalInputDelta=0.11503666639328003
    New Minimum: 3.1968957483768463 > 2.4132333993911743
    END: th(7818012.6031877)=2.4132333993911743; dx=-5.1912489288315525E-8 evalInputDelta=0.898699015378952
    Fitness changed from 3.3119324147701263 to 2.4132333993911743
    Iteration 1 complete. Error: 2.4132333

...skipping 6155 bytes...

     history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.439e+03, gradient 6.225e-05, dot -0.630; [e290456b-bbf1-43d7-ac10-2ff6d118bfe2 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.8162092864513397, 1.4755238145589828, 2.4132333993911743, 3.3119324147701263
    LBFGS Accumulation History: 3 points
    Removed measurement 7a7b9d73 to history. Total: 3
    th(0)=-0.8162092864513397;dx=-3.8742856990181E-9
    New Minimum: -0.8162092864513397 > -0.9518660455942154
    END: th(5.0400000000000015E7)=-0.9518660455942154; dx=-1.3696197652523215E-9 evalInputDelta=0.13565675914287567
    Fitness changed from -0.8162092864513397 to -0.9518660455942154
    Iteration 9 complete. Error: -0.9518660455942154 Total: 63.1160; Orientation: 1.8354; Line Search: 41.1413
    Adding measurement 56d79a7e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.669e+03, gradient 7.611e-05, dot -0.520; [e290456b-bbf1-43d7-ac10-2ff6d118bfe2 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.9518660455942154, 1.4755238145589828, 2.4132333993911743, 3.3119324147701263
    LBFGS Accumulation History: 3 points
    Removed measurement 56d79a7e to history. Total: 3
    th(0)=-0.9518660455942154;dx=-5.791844898870784E-9
    Armijo: th(1.0858350837760697E8)=-0.7998751550912857; dx=1.941499854488126E-9 evalInputDelta=-0.1519908905029297
    New Minimum: -0.9518660455942154 > -0.9997116029262543
    WOLF (strong): th(5.429175418880349E7)=-0.9997116029262543; dx=8.659389693770203E-10 evalInputDelta=0.04784555733203888
    New Minimum: -0.9997116029262543 > -1.034537896513939
    END: th(1.8097251396267828E7)=-1.034537896513939; dx=-1.8847203130256505E-9 evalInputDelta=0.08267185091972351
    Fitness changed from -0.9518660455942154 to -1.034537896513939
    Iteration 10 complete. Error: -1.034537896513939 Total: 99.6602; Orientation: 1.8448; Line Search: 79.5799
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/f7a10ed6-64cd-4dd8-9afb-bcadde97557e.jpg)
    
    Final threshold in iteration 11: -1.034537896513939 (> -Infinity) after 978.034s (< 3600.000s)
    

Returns:

    -1.034537896513939