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 71.04 seconds (3.287 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: 512861465646
    Reset training subject: 514813711271
    Adding measurement 1da3e6a4 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=18.775837741792202;dx=-1.9706192870226877E-5
    New Minimum: 18.775837741792202 > 18.77572723850608
    WOLFE (weak): th(2.154434690031884)=18.77572723850608; dx=-1.978241012136258E-5 evalInputDelta=1.1050328612327576E-4
    New Minimum: 18.77572723850608 > 18.775616955012083
    WOLFE (weak): th(4.308869380063768)=18.775616955012083; dx=-1.9707942813260778E-5 evalInputDelta=2.2078678011894226E-4
    New Minimum: 18.775616955012083 > 18.775174535810947
    WOLFE (weak): th(12.926608140191302)=18.775174535810947; dx=-1.9737819753709288E-5 evalInputDelta=6.632059812545776E-4
    New Minimum: 18.775174535810947 > 18.773182943463326
    WOLFE (weak): th(51.70643256076521)=18.773182943463326; dx=-1.9721815154763164E-5 evalInputDelta=0.0026547983288764954
    New Minimum: 18.773182943463326 > 18.762420743703842
    WOLFE (weak): th(258.53216280382605)=18.762420743703842; dx=-1.993889611399472E-5 evalInputDelta=0.013416998088359833
    New Minimum: 18.762420743703842 > 18.692946054041386
    WOLFE (weak): th(1551.1929768229563)=18.692946054041386; dx=-2.065152477334182E-5 evalInputDelta=0.08289168775081635
    New Minimum: 18.692946054041386 > 18.15492980182171
    END: th(10858.350837760694)=18.15492980182171; dx=-1.4778235773817987E-5 evalInputDelta=0.6209079399704933
    Fitness changed from 18.775837741792202 to 18.15492980182171
    Iteration 1 complete. Error: 18.15492980182171 Total: 17.7465; Orientation: 0.0417; Line Search: 12.7985
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/06641285-a04d-4f97-ad29-71bf710f97ea.jpg)
    
    Adding measurement 6a845824 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=18.15492980182171;dx=-2.8995228911273064E-5
    New Minimum: 18.15492980182171 > 16.958923496305943
    END: th(23393.607721408407)=16.958923496305943; dx=-1.201195143948307E-5 evalInputDelta=1.1960063055157661
    Fitness changed from 18.15492980182171 t

...skipping 5593 bytes...

    e+03, gradient 2.661e-03, dot -0.219; [88feb18b-8792-449e-966f-e0c67b4f2495 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 8.70378591120243, 16.958923496305943, 18.15492980182171, 18.775837741792202
    LBFGS Accumulation History: 3 points
    Removed measurement 96c8840 to history. Total: 3
    th(0)=8.70378591120243;dx=-6.992321234861637E-6
    New Minimum: 8.70378591120243 > 8.388072103261948
    WOLF (strong): th(140000.00000000006)=8.388072103261948; dx=1.4809924252914209E-6 evalInputDelta=0.3157138079404831
    New Minimum: 8.388072103261948 > 8.180918589234352
    WOLF (strong): th(70000.00000000003)=8.180918589234352; dx=1.1478680761871354E-7 evalInputDelta=0.5228673219680786
    END: th(23333.333333333343)=8.38195613026619; dx=-3.565844507726689E-6 evalInputDelta=0.32182978093624115
    Fitness changed from 8.70378591120243 to 8.180918589234352
    Iteration 9 complete. Error: 8.180918589234352 Total: 7.7570; Orientation: 0.1117; Line Search: 6.0559
    Adding measurement 27ada54b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.732e+03, gradient 3.049e-03, dot -0.170; [88feb18b-8792-449e-966f-e0c67b4f2495 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 8.180918589234352, 16.958923496305943, 18.15492980182171, 18.775837741792202
    LBFGS Accumulation History: 3 points
    Removed measurement 27ada54b to history. Total: 3
    th(0)=8.180918589234352;dx=-9.111169341404871E-6
    New Minimum: 8.180918589234352 > 7.808704808354378
    WOLF (strong): th(50270.142767410645)=7.808704808354378; dx=7.610805044477243E-7 evalInputDelta=0.37221378087997437
    END: th(25135.071383705323)=7.847807824611664; dx=-4.097518957382315E-6 evalInputDelta=0.3331107646226883
    Fitness changed from 8.180918589234352 to 7.808704808354378
    Iteration 10 complete. Error: 7.808704808354378 Total: 6.2485; Orientation: 0.1326; Line Search: 4.6645
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/0061b724-8bcd-43e0-84a3-2edfdceb3ab6.jpg)
    
    Final threshold in iteration 11: 7.808704808354378 (> -Infinity) after 71.021s (< 1800.000s)
    

Returns:

    7.808704808354378