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 238.95 seconds (5.909 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: 1001039543861
    Reset training subject: 1006902440393
    Adding measurement 44ed4ecb to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=24.92032370250672;dx=-8.712456240221855E-6
    New Minimum: 24.92032370250672 > 24.920287735760212
    WOLFE (weak): th(2.154434690031884)=24.920287735760212; dx=-8.469334871036992E-6 evalInputDelta=3.5966746509075165E-5
    New Minimum: 24.920287735760212 > 24.92025235807523
    WOLFE (weak): th(4.308869380063768)=24.92025235807523; dx=-8.739771515158636E-6 evalInputDelta=7.134443148970604E-5
    New Minimum: 24.92025235807523 > 24.92010967992246
    WOLFE (weak): th(12.926608140191302)=24.92010967992246; dx=-8.620700332487635E-6 evalInputDelta=2.1402258425951004E-4
    New Minimum: 24.92010967992246 > 24.919469671789557
    WOLFE (weak): th(51.70643256076521)=24.919469671789557; dx=-8.624499446502841E-6 evalInputDelta=8.54030717164278E-4
    New Minimum: 24.919469671789557 > 24.916042361408472
    WOLFE (weak): th(258.53216280382605)=24.916042361408472; dx=-8.774995187127799E-6 evalInputDelta=0.004281341098248959
    New Minimum: 24.916042361408472 > 24.893981623463333
    WOLFE (weak): th(1551.1929768229563)=24.893981623463333; dx=-9.176110524628273E-6 evalInputDelta=0.026342079043388367
    New Minimum: 24.893981623463333 > 24.71471780911088
    WOLFE (weak): th(10858.350837760694)=24.71471780911088; dx=-1.1597030910549722E-5 evalInputDelta=0.20560589339584112
    New Minimum: 24.71471780911088 > 23.50277940556407
    END: th(86866.80670208555)=23.50277940556407; dx=-5.466346276127887E-6 evalInputDelta=1.4175442969426513
    Fitness changed from 24.92032370250672 to 23.50277940556407
    Iteration 1 complete. Error: 23.50277940556407 Total: 62.8622; Orientation: 0.0508; Line Search: 47.2474
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/5b71f261-5f0f-4f6b-a978-1d5da9718850.jpg)
    
    Adding measurement 5459a63a to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=23.50277940556407;dx=-1.4555678718059279E-5
    New Minimum: 23.50277940556407 > 21.084443

...skipping 5703 bytes...

    ejected: LBFGS Orientation magnitude: 1.993e+03, gradient 5.939e-04, dot -0.240; [158141ec-3d2e-459b-9e2c-de2cb483e3de = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.620960831642151, 21.084443729370832, 23.50277940556407, 24.92032370250672
    LBFGS Accumulation History: 3 points
    Removed measurement 752672a6 to history. Total: 3
    th(0)=3.620960831642151;dx=-3.479304604458246E-7
    New Minimum: 3.620960831642151 > 3.2283945232629776
    WOLF (strong): th(1680000.0000000007)=3.2283945232629776; dx=4.0173181599247034E-9 evalInputDelta=0.3925663083791733
    END: th(840000.0000000003)=3.2528769820928574; dx=-1.5119987975265253E-7 evalInputDelta=0.3680838495492935
    Fitness changed from 3.620960831642151 to 3.2283945232629776
    Iteration 9 complete. Error: 3.2283945232629776 Total: 20.5750; Orientation: 0.2440; Line Search: 15.4893
    Adding measurement 1374b85e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.888e+03, gradient 8.043e-04, dot -0.171; [158141ec-3d2e-459b-9e2c-de2cb483e3de = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.2283945232629776, 21.084443729370832, 23.50277940556407, 24.92032370250672
    LBFGS Accumulation History: 3 points
    Removed measurement 1374b85e to history. Total: 3
    th(0)=3.2283945232629776;dx=-6.401888451848432E-7
    Armijo: th(1809725.139626783)=3.43731277436018; dx=2.993393945421261E-7 evalInputDelta=-0.2089182510972023
    New Minimum: 3.2283945232629776 > 2.887509375810623
    WOLF (strong): th(904862.5698133915)=2.887509375810623; dx=1.4459780752411857E-7 evalInputDelta=0.34088514745235443
    END: th(301620.8566044638)=2.899299204349518; dx=-2.726001284529191E-7 evalInputDelta=0.3290953189134598
    Fitness changed from 3.2283945232629776 to 2.887509375810623
    Iteration 10 complete. Error: 2.887509375810623 Total: 25.9789; Orientation: 0.3546; Line Search: 20.7702
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/c7cfc6cc-f493-41ae-a78b-4572aa995f93.jpg)
    
    Final threshold in iteration 11: 2.887509375810623 (> -Infinity) after 238.927s (< 1800.000s)
    

Returns:

    2.887509375810623