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 188.73 seconds (2.772 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: 1318789736350
    Reset training subject: 1322573465477
    Adding measurement 2c03b8b3 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=12.687524676322937;dx=-3.060927969308417E-7
    New Minimum: 12.687524676322937 > 12.687523499131203
    WOLFE (weak): th(2.154434690031884)=12.687523499131203; dx=-3.042853114726338E-7 evalInputDelta=1.1771917343139648E-6
    New Minimum: 12.687523499131203 > 12.687522038817406
    WOLFE (weak): th(4.308869380063768)=12.687522038817406; dx=-3.0506937935005896E-7 evalInputDelta=2.637505531311035E-6
    New Minimum: 12.687522038817406 > 12.687516152858734
    WOLFE (weak): th(12.926608140191302)=12.687516152858734; dx=-3.0504054583449977E-7 evalInputDelta=8.52346420288086E-6
    New Minimum: 12.687516152858734 > 12.687490195035934
    WOLFE (weak): th(51.70643256076521)=12.687490195035934; dx=-3.051784426517259E-7 evalInputDelta=3.4481287002563477E-5
    New Minimum: 12.687490195035934 > 12.687351882457733
    WOLFE (weak): th(258.53216280382605)=12.687351882457733; dx=-3.0509935923809504E-7 evalInputDelta=1.7279386520385742E-4
    New Minimum: 12.687351882457733 > 12.686488389968872
    WOLFE (weak): th(1551.1929768229563)=12.686488389968872; dx=-3.050353692384691E-7 evalInputDelta=0.0010362863540649414
    New Minimum: 12.686488389968872 > 12.680271968245506
    WOLFE (weak): th(10858.350837760694)=12.680271968245506; dx=-3.0507055024413824E-7 evalInputDelta=0.007252708077430725
    New Minimum: 12.680271968245506 > 12.629609897732735
    WOLFE (weak): th(86866.80670208555)=12.629609897732735; dx=-3.035122358663694E-7 evalInputDelta=0.05791477859020233
    New Minimum: 12.629609897732735 > 12.179231435060501
    WOLFE (weak): th(781801.26031877)=12.179231435060501; dx=-2.8540690041193943E-7 evalInputDelta=0.5082932412624359
    New Minimum: 12.179231435060501 > 9.748707368969917
    END: th(7818012.6031877)=9.748707368969917; dx=-8.550680935066997E-8 evalInputDelta=2.9388173073530197
    Fitness changed from 12.687524676322937 to 9.748707368969917
    Iteration 1 complete. Error: 9.748707

...skipping 6034 bytes...

    392
    Adding measurement 3bd5aa19 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.842e+03, gradient 1.792e-04, dot -0.450; [1a09c090-e4ff-4871-b3bb-dd186d187934 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.86631740629673, 7.6131851375103, 9.748707368969917, 12.687524676322937
    LBFGS Accumulation History: 3 points
    Removed measurement 3bd5aa19 to history. Total: 3
    th(0)=1.86631740629673;dx=-3.2041353411785596E-8
    Armijo: th(5.0400000000000015E7)=2.390956684947014; dx=1.1014940406263394E-8 evalInputDelta=-0.5246392786502838
    New Minimum: 1.86631740629673 > 1.7037021070718765
    WOLF (strong): th(2.5200000000000007E7)=1.7037021070718765; dx=8.377925513914809E-9 evalInputDelta=0.16261529922485352
    New Minimum: 1.7037021070718765 > 1.5710829049348831
    END: th(8400000.000000002)=1.5710829049348831; dx=-1.225638226953493E-8 evalInputDelta=0.2952345013618469
    Fitness changed from 1.86631740629673 to 1.5710829049348831
    Iteration 9 complete. Error: 1.5710829049348831 Total: 19.1945; Orientation: 0.3209; Line Search: 15.2309
    Adding measurement 6e1fd0f9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.007e+04, gradient 1.356e-04, dot -0.542; [1a09c090-e4ff-4871-b3bb-dd186d187934 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.5710829049348831, 7.6131851375103, 9.748707368969917, 12.687524676322937
    LBFGS Accumulation History: 3 points
    Removed measurement 6e1fd0f9 to history. Total: 3
    th(0)=1.5710829049348831;dx=-1.8363129378747042E-8
    New Minimum: 1.5710829049348831 > 1.3724326640367508
    END: th(1.8097251396267828E7)=1.3724326640367508; dx=-2.7107208926589997E-9 evalInputDelta=0.19865024089813232
    Fitness changed from 1.5710829049348831 to 1.3724326640367508
    Iteration 10 complete. Error: 1.3724326640367508 Total: 11.8595; Orientation: 0.3535; Line Search: 7.6338
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/0555240c-523e-4d30-9fd8-14ecc7678c86.jpg)
    
    Final threshold in iteration 11: 1.3724326640367508 (> -Infinity) after 188.733s (< 3600.000s)
    

Returns:

    1.3724326640367508