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 193.23 seconds (3.212 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: 1546793456779
    Reset training subject: 1551158340613
    Adding measurement 28538ee7 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=4.027254223823547;dx=-8.957937990336382E-8
    New Minimum: 4.027254223823547 > 4.027253746986389
    WOLFE (weak): th(2.154434690031884)=4.027253746986389; dx=-8.956869175556508E-8 evalInputDelta=4.76837158203125E-7
    New Minimum: 4.027253746986389 > 4.0272533148527145
    WOLFE (weak): th(4.308869380063768)=4.0272533148527145; dx=-8.95646243899215E-8 evalInputDelta=9.08970832824707E-7
    New Minimum: 4.0272533148527145 > 4.027251720428467
    WOLFE (weak): th(12.926608140191302)=4.027251720428467; dx=-8.955504818028691E-8 evalInputDelta=2.5033950805664062E-6
    New Minimum: 4.027251720428467 > 4.02724514901638
    WOLFE (weak): th(51.70643256076521)=4.02724514901638; dx=-8.95594983582245E-8 evalInputDelta=9.074807167053223E-6
    New Minimum: 4.02724514901638 > 4.027208790183067
    WOLFE (weak): th(258.53216280382605)=4.027208790183067; dx=-8.956985387114252E-8 evalInputDelta=4.5433640480041504E-5
    New Minimum: 4.027208790183067 > 4.026982218027115
    WOLFE (weak): th(1551.1929768229563)=4.026982218027115; dx=-8.956587191621437E-8 evalInputDelta=2.720057964324951E-4
    New Minimum: 4.026982218027115 > 4.025350853800774
    WOLFE (weak): th(10858.350837760694)=4.025350853800774; dx=-8.93676987945241E-8 evalInputDelta=0.0019033700227737427
    New Minimum: 4.025350853800774 > 4.0120895355939865
    WOLFE (weak): th(86866.80670208555)=4.0120895355939865; dx=-8.880462046515833E-8 evalInputDelta=0.015164688229560852
    New Minimum: 4.0120895355939865 > 3.8955252915620804
    WOLFE (weak): th(781801.26031877)=3.8955252915620804; dx=-8.256258974122364E-8 evalInputDelta=0.13172893226146698
    New Minimum: 3.8955252915620804 > 3.198085457086563
    END: th(7818012.6031877)=3.198085457086563; dx=-3.438347458247122E-8 evalInputDelta=0.8291687667369843
    Fitness changed from 4.027254223823547 to 3.198085457086563
    Iteration 1 complete. Error: 3.198085457086563 Total: 54.9781; Orient

...skipping 6184 bytes...

     15.4291; Orientation: 0.3232; Line Search: 11.2455
    Adding measurement 1e277533 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.234e+04, gradient 1.258e-04, dot -0.602; [fb75aaf6-cf18-472b-ae9c-659981b22e54 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.7734053283929825, 2.5574561208486557, 3.198085457086563, 4.027254223823547
    LBFGS Accumulation History: 3 points
    Removed measurement 1e277533 to history. Total: 3
    th(0)=0.7734053283929825;dx=-1.5721957062115864E-8
    Armijo: th(2.5200000000000007E7)=0.7922670096158981; dx=3.074617982826191E-9 evalInputDelta=-0.01886168122291565
    New Minimum: 0.7734053283929825 > 0.6714290976524353
    WOLF (strong): th(1.2600000000000004E7)=0.6714290976524353; dx=7.477638626782023E-10 evalInputDelta=0.10197623074054718
    END: th(4200000.000000001)=0.6918796598911285; dx=-9.657344626084997E-9 evalInputDelta=0.08152566850185394
    Fitness changed from 0.7734053283929825 to 0.6714290976524353
    Iteration 9 complete. Error: 0.6714290976524353 Total: 20.1498; Orientation: 0.3216; Line Search: 16.1428
    Adding measurement 16183aff to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.203e+04, gradient 1.311e-04, dot -0.553; [fb75aaf6-cf18-472b-ae9c-659981b22e54 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6714290976524353, 2.5574561208486557, 3.198085457086563, 4.027254223823547
    LBFGS Accumulation History: 3 points
    Removed measurement 16183aff to history. Total: 3
    th(0)=0.6714290976524353;dx=-1.715089387878086E-8
    New Minimum: 0.6714290976524353 > 0.553335040807724
    END: th(9048625.698133914)=0.553335040807724; dx=-1.3803626567715151E-9 evalInputDelta=0.1180940568447113
    Fitness changed from 0.6714290976524353 to 0.553335040807724
    Iteration 10 complete. Error: 0.553335040807724 Total: 11.6330; Orientation: 0.3227; Line Search: 7.6656
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/7ec2cb48-88ab-4312-801c-cccc6eb57219.jpg)
    
    Final threshold in iteration 11: 0.553335040807724 (> -Infinity) after 193.226s (< 3600.000s)
    

Returns:

    0.553335040807724