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 699.67 seconds (3.272 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: 1001576219055
    Reset training subject: 1016662019388
    Adding measurement 32f26337 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=5.194810651242733;dx=-1.1736422389908384E-6
    New Minimum: 5.194810651242733 > 5.194806814193726
    WOLFE (weak): th(2.154434690031884)=5.194806814193726; dx=-1.1680535674077537E-6 evalInputDelta=3.8370490074157715E-6
    New Minimum: 5.194806814193726 > 5.194801971316338
    WOLFE (weak): th(4.308869380063768)=5.194801971316338; dx=-1.1681074408154913E-6 evalInputDelta=8.67992639541626E-6
    New Minimum: 5.194801971316338 > 5.194784991443157
    WOLFE (weak): th(12.926608140191302)=5.194784991443157; dx=-1.1678690858678228E-6 evalInputDelta=2.5659799575805664E-5
    New Minimum: 5.194784991443157 > 5.194708846509457
    WOLFE (weak): th(51.70643256076521)=5.194708846509457; dx=-1.1677960005665242E-6 evalInputDelta=1.0180473327636719E-4
    New Minimum: 5.194708846509457 > 5.194301225244999
    WOLFE (weak): th(258.53216280382605)=5.194301225244999; dx=-1.1681850062995821E-6 evalInputDelta=5.094259977340698E-4
    New Minimum: 5.194301225244999 > 5.191752426326275
    WOLFE (weak): th(1551.1929768229563)=5.191752426326275; dx=-1.1678632901816154E-6 evalInputDelta=0.00305822491645813
    New Minimum: 5.191752426326275 > 5.173422299325466
    WOLFE (weak): th(10858.350837760694)=5.173422299325466; dx=-1.1638251740188596E-6 evalInputDelta=0.021388351917266846
    New Minimum: 5.173422299325466 > 5.025893568992615
    WOLFE (weak): th(86866.80670208555)=5.025893568992615; dx=-1.1367243121024158E-6 evalInputDelta=0.16891708225011826
    New Minimum: 5.025893568992615 > 3.9216948747634888
    END: th(781801.26031877)=3.9216948747634888; dx=-7.635454372992325E-7 evalInputDelta=1.2731157764792442
    Fitness changed from 5.194810651242733 to 3.9216948747634888
    Iteration 1 complete. Error: 3.9216948747634888 Total: 196.5698; Orientation: 0.0406; Line Search: 152.3350
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/7a4c3c24-bac0-42ec-b881-730fcacf3b20.jpg)
    
    Adding meas

...skipping 5627 bytes...

    4677
    END: th(2339360.772140841)=-4.07303361594677; dx=-2.7677211410485406E-8 evalInputDelta=0.43398529291152954
    Fitness changed from -3.63904832303524 to -4.07303361594677
    Iteration 8 complete. Error: -4.07303361594677 Total: 64.0558; Orientation: 0.9619; Line Search: 45.9425
    Adding measurement 4ae41659 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.870e+03, gradient 1.922e-04, dot -0.413; [05498d3d-5750-424c-a33c-270ad25084fc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -4.07303361594677, 2.2357431799173355, 3.9216948747634888, 5.194810651242733
    LBFGS Accumulation History: 3 points
    Removed measurement 4ae41659 to history. Total: 3
    th(0)=-4.07303361594677;dx=-3.6937376475698404E-8
    New Minimum: -4.07303361594677 > -4.329521596431732
    END: th(5040000.000000001)=-4.329521596431732; dx=-2.219028637509014E-8 evalInputDelta=0.25648798048496246
    Fitness changed from -4.07303361594677 to -4.329521596431732
    Iteration 9 complete. Error: -4.329521596431732 Total: 47.2058; Orientation: 0.9377; Line Search: 32.0193
    Adding measurement 1cfde4d0 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.672e+03, gradient 1.804e-04, dot -0.413; [05498d3d-5750-424c-a33c-270ad25084fc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -4.329521596431732, 2.2357431799173355, 3.9216948747634888, 5.194810651242733
    LBFGS Accumulation History: 3 points
    Removed measurement 1cfde4d0 to history. Total: 3
    th(0)=-4.329521596431732;dx=-3.252155221582802E-8
    New Minimum: -4.329521596431732 > -4.525095701217651
    END: th(1.0858350837760696E7)=-4.525095701217651; dx=-1.1706700343779325E-10 evalInputDelta=0.1955741047859192
    Fitness changed from -4.329521596431732 to -4.525095701217651
    Iteration 10 complete. Error: -4.525095701217651 Total: 47.3607; Orientation: 1.0177; Line Search: 31.0026
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/d2007a1b-98a1-434f-9cf5-70828d2a9915.jpg)
    
    Final threshold in iteration 11: -4.525095701217651 (> -Infinity) after 699.664s (< 1800.000s)
    

Returns:

    -4.525095701217651