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 656.03 seconds (7.465 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: 8986131172291
    Reset training subject: 9000290126120
    Adding measurement 8d90d17 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.013633526861668;dx=-4.4927594553270814E-7
    New Minimum: 8.013633526861668 > 8.013633325695992
    WOLFE (weak): th(2.154434690031884)=8.013633325695992; dx=-4.4895624368401536E-7 evalInputDelta=2.0116567611694336E-7
    New Minimum: 8.013633325695992 > 8.01363243162632
    WOLFE (weak): th(4.308869380063768)=8.01363243162632; dx=-4.4895622213989826E-7 evalInputDelta=1.0952353477478027E-6
    New Minimum: 8.01363243162632 > 8.013626717031002
    WOLFE (weak): th(12.926608140191302)=8.013626717031002; dx=-4.489554153983293E-7 evalInputDelta=6.809830665588379E-6
    New Minimum: 8.013626717031002 > 8.01360497623682
    WOLFE (weak): th(51.70643256076521)=8.01360497623682; dx=-4.4893906928102595E-7 evalInputDelta=2.855062484741211E-5
    New Minimum: 8.01360497623682 > 8.01349126547575
    WOLFE (weak): th(258.53216280382605)=8.01349126547575; dx=-4.489409215255027E-7 evalInputDelta=1.4226138591766357E-4
    New Minimum: 8.01349126547575 > 8.012779742479324
    WOLFE (weak): th(1551.1929768229563)=8.012779742479324; dx=-4.4879603615842625E-7 evalInputDelta=8.537843823432922E-4
    New Minimum: 8.012779742479324 > 8.007660426199436
    WOLFE (weak): th(10858.350837760694)=8.007660426199436; dx=-4.4821796946654164E-7 evalInputDelta=0.005973100662231445
    New Minimum: 8.007660426199436 > 7.9661020785570145
    WOLFE (weak): th(86866.80670208555)=7.9661020785570145; dx=-4.429799582473248E-7 evalInputDelta=0.04753144830465317
    New Minimum: 7.9661020785570145 > 7.610679745674133
    END: th(781801.26031877)=7.610679745674133; dx=-3.8470123049871925E-7 evalInputDelta=0.40295378118753433
    Fitness changed from 8.013633526861668 to 7.610679745674133
    Iteration 1 complete. Error: 7.610679745674133 Total: 186.7229; Orientation: 0.0662; Line Search: 143.9845
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/03e15f93-49fc-4715-a87d-a528631a8158.jpg)
    
    Adding measurement 14

...skipping 5592 bytes...

    ent 51ca609f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.245e+03, gradient 1.785e-04, dot -0.384; [bb575b3c-5260-4b8d-86e6-98cf3434cbc6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.8796800523996353, 6.955566518008709, 7.610679745674133, 8.013633526861668
    LBFGS Accumulation History: 3 points
    Removed measurement 51ca609f to history. Total: 3
    th(0)=0.8796800523996353;dx=-3.1858614637027655E-8
    New Minimum: 0.8796800523996353 > 0.8523693531751633
    WOLF (strong): th(3.0240000000000004E7)=0.8523693531751633; dx=1.2178307485790412E-8 evalInputDelta=0.027310699224472046
    New Minimum: 0.8523693531751633 > 0.6638467982411385
    END: th(1.5120000000000002E7)=0.6638467982411385; dx=-1.3157851689627632E-10 evalInputDelta=0.21583325415849686
    Fitness changed from 0.8796800523996353 to 0.6638467982411385
    Iteration 9 complete. Error: 0.6638467982411385 Total: 57.6909; Orientation: 1.5229; Line Search: 43.1846
    Adding measurement c4e5490 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.429e+03, gradient 2.263e-04, dot -0.282; [bb575b3c-5260-4b8d-86e6-98cf3434cbc6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6638467982411385, 6.955566518008709, 7.610679745674133, 8.013633526861668
    LBFGS Accumulation History: 3 points
    Removed measurement c4e5490 to history. Total: 3
    th(0)=0.6638467982411385;dx=-5.122971950406637E-8
    Armijo: th(3.2575052513282087E7)=0.6693320572376251; dx=2.1997147809803115E-8 evalInputDelta=-0.005485258996486664
    New Minimum: 0.6638467982411385 > 0.4876750335097313
    END: th(1.6287526256641043E7)=0.4876750335097313; dx=-6.5197942298769584E-9 evalInputDelta=0.17617176473140717
    Fitness changed from 0.6638467982411385 to 0.4876750335097313
    Iteration 10 complete. Error: 0.4876750335097313 Total: 59.3938; Orientation: 1.6535; Line Search: 43.7420
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/0a923c16-f61e-4587-b0e3-1da38fa54ece.jpg)
    
    Final threshold in iteration 11: 0.4876750335097313 (> -Infinity) after 656.029s (< 3600.000s)
    

Returns:

    0.4876750335097313