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 669.21 seconds (5.186 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: 10818114458416
    Reset training subject: 10833082164523
    Adding measurement 18e4cf3b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.286032259464264;dx=-4.3528928777061394E-7
    New Minimum: 8.286032259464264 > 8.286032132804394
    WOLFE (weak): th(2.154434690031884)=8.286032132804394; dx=-4.350857348063257E-7 evalInputDelta=1.2665987014770508E-7
    New Minimum: 8.286032132804394 > 8.286031194031239
    WOLFE (weak): th(4.308869380063768)=8.286031194031239; dx=-4.3508546542985374E-7 evalInputDelta=1.0654330253601074E-6
    New Minimum: 8.286031194031239 > 8.286025814712048
    WOLFE (weak): th(12.926608140191302)=8.286025814712048; dx=-4.3508552132010446E-7 evalInputDelta=6.444752216339111E-6
    New Minimum: 8.286025814712048 > 8.286004185676575
    WOLFE (weak): th(51.70643256076521)=8.286004185676575; dx=-4.3507760611882787E-7 evalInputDelta=2.8073787689208984E-5
    New Minimum: 8.286004185676575 > 8.28589342534542
    WOLFE (weak): th(258.53216280382605)=8.28589342534542; dx=-4.35057915878521E-7 evalInputDelta=1.388341188430786E-4
    New Minimum: 8.28589342534542 > 8.285198867321014
    WOLFE (weak): th(1551.1929768229563)=8.285198867321014; dx=-4.3502463993322896E-7 evalInputDelta=8.333921432495117E-4
    New Minimum: 8.285198867321014 > 8.280200444161892
    WOLFE (weak): th(10858.350837760694)=8.280200444161892; dx=-4.344146389500788E-7 evalInputDelta=0.005831815302371979
    New Minimum: 8.280200444161892 > 8.239571787416935
    WOLFE (weak): th(86866.80670208555)=8.239571787416935; dx=-4.303803577723537E-7 evalInputDelta=0.04646047204732895
    New Minimum: 8.239571787416935 > 7.886813051998615
    END: th(781801.26031877)=7.886813051998615; dx=-3.8299815653587477E-7 evalInputDelta=0.39921920746564865
    Fitness changed from 8.286032259464264 to 7.886813051998615
    Iteration 1 complete. Error: 7.886813051998615 Total: 186.8266; Orientation: 0.0684; Line Search: 142.1197
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/414341d8-2a66-4a82-9d3e-aad21b704423.jpg)
    
    Adding measuremen

...skipping 5525 bytes...

    0; Orientation: 1.5930; Line Search: 29.9508
    Adding measurement 5ba75f16 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.140e+03, gradient 1.803e-04, dot -0.380; [8ef0c455-ae07-470d-ba7b-194f64bc715c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.0618783086538315, 7.205256700515747, 7.886813051998615, 8.286032259464264
    LBFGS Accumulation History: 3 points
    Removed measurement 5ba75f16 to history. Total: 3
    th(0)=1.0618783086538315;dx=-3.250574119789034E-8
    Armijo: th(3.0240000000000004E7)=1.0757614523172379; dx=1.4100742890728568E-8 evalInputDelta=-0.013883143663406372
    New Minimum: 1.0618783086538315 > 0.8522626459598541
    WOLF (strong): th(1.5120000000000002E7)=0.8522626459598541; dx=8.250138844819265E-10 evalInputDelta=0.20961566269397736
    END: th(5040000.000000001)=0.9153269529342651; dx=-1.9780224384987937E-8 evalInputDelta=0.14655135571956635
    Fitness changed from 1.0618783086538315 to 0.8522626459598541
    Iteration 9 complete. Error: 0.8522626459598541 Total: 74.3589; Orientation: 1.6224; Line Search: 58.1709
    Adding measurement ee32b7e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.225e+03, gradient 2.337e-04, dot -0.268; [8ef0c455-ae07-470d-ba7b-194f64bc715c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.8522626459598541, 7.205256700515747, 7.886813051998615, 8.286032259464264
    LBFGS Accumulation History: 3 points
    Removed measurement ee32b7e to history. Total: 3
    th(0)=0.8522626459598541;dx=-5.461197648101785E-8
    New Minimum: 0.8522626459598541 > 0.6747731268405914
    END: th(1.0858350837760696E7)=0.6747731268405914; dx=-2.9937488706149356E-9 evalInputDelta=0.1774895191192627
    Fitness changed from 0.8522626459598541 to 0.6747731268405914
    Iteration 10 complete. Error: 0.6747731268405914 Total: 44.3329; Orientation: 1.7865; Line Search: 28.3297
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/0ec5b55c-c3f2-499b-a3e9-76c0876c9816.jpg)
    
    Final threshold in iteration 11: 0.6747731268405914 (> -Infinity) after 669.213s (< 3600.000s)
    

Returns:

    0.6747731268405914