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 148.34 seconds (6.636 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: 813645166916
    Reset training subject: 816634843147
    Adding measurement 5199766 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=11.261274203658104;dx=-1.221794825535827E-5
    New Minimum: 11.261274203658104 > 11.26123809069395
    WOLFE (weak): th(2.154434690031884)=11.26123809069395; dx=-1.22122507926871E-5 evalInputDelta=3.6112964153289795E-5
    New Minimum: 11.26123809069395 > 11.261201545596123
    WOLFE (weak): th(4.308869380063768)=11.261201545596123; dx=-1.2215410417222704E-5 evalInputDelta=7.265806198120117E-5
    New Minimum: 11.261201545596123 > 11.261058013886213
    WOLFE (weak): th(12.926608140191302)=11.261058013886213; dx=-1.222030619779873E-5 evalInputDelta=2.1618977189064026E-4
    New Minimum: 11.261058013886213 > 11.26041068136692
    WOLFE (weak): th(51.70643256076521)=11.26041068136692; dx=-1.2221686110205738E-5 evalInputDelta=8.635222911834717E-4
    New Minimum: 11.26041068136692 > 11.25695689022541
    WOLFE (weak): th(258.53216280382605)=11.25695689022541; dx=-1.2225468226601243E-5 evalInputDelta=0.0043173134326934814
    New Minimum: 11.25695689022541 > 11.235330995172262
    WOLFE (weak): th(1551.1929768229563)=11.235330995172262; dx=-1.2268650659627304E-5 evalInputDelta=0.02594320848584175
    New Minimum: 11.235330995172262 > 11.077371079474688
    WOLFE (weak): th(10858.350837760694)=11.077371079474688; dx=-1.2539596543740281E-5 evalInputDelta=0.18390312418341637
    New Minimum: 11.077371079474688 > 9.782400235533714
    WOLFE (weak): th(86866.80670208555)=9.782400235533714; dx=-1.1875800053400456E-5 evalInputDelta=1.4788739681243896
    New Minimum: 9.782400235533714 > 4.386841714382172
    END: th(781801.26031877)=4.386841714382172; dx=-2.933424562053454E-7 evalInputDelta=6.874432489275932
    Fitness changed from 11.261274203658104 to 4.386841714382172
    Iteration 1 complete. Error: 4.386841714382172 Total: 37.5032; Orientation: 0.0565; Line Search: 28.4155
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/46861660-8497-4df2-b591-600366feadac.jpg)
    
    Adding meas

...skipping 6082 bytes...

    ude: 1.780e+03, gradient 8.037e-04, dot -0.589; [3479b7d8-5311-4728-8b1f-9d5a6763aa61 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.3248409181833267, 2.1919314712285995, 4.386841714382172, 11.261274203658104
    LBFGS Accumulation History: 3 points
    Removed measurement 6e5e3bf1 to history. Total: 3
    th(0)=-0.3248409181833267;dx=-6.445138150125693E-7
    Armijo: th(2520000.0000000005)=1.7274640202522278; dx=1.7394180137550895E-6 evalInputDelta=-2.0523049384355545
    Armijo: th(1260000.0000000002)=-0.09489908814430237; dx=4.467913376099657E-7 evalInputDelta=-0.22994183003902435
    New Minimum: -0.3248409181833267 > -0.4556373059749603
    WOLF (strong): th(420000.00000000006)=-0.4556373059749603; dx=9.02340477735223E-8 evalInputDelta=0.1307963877916336
    END: th(105000.00000000001)=-0.39703643321990967; dx=-4.166511462005307E-7 evalInputDelta=0.07219551503658295
    Fitness changed from -0.3248409181833267 to -0.4556373059749603
    Iteration 9 complete. Error: -0.4556373059749603 Total: 17.2737; Orientation: 0.3662; Line Search: 14.2191
    Adding measurement 279068cc to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.811e+03, gradient 5.092e-04, dot -0.704; [3479b7d8-5311-4728-8b1f-9d5a6763aa61 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.4556373059749603, 2.1919314712285995, 4.386841714382172, 11.261274203658104
    LBFGS Accumulation History: 3 points
    Removed measurement 279068cc to history. Total: 3
    th(0)=-0.4556373059749603;dx=-2.5836425040770735E-7
    New Minimum: -0.4556373059749603 > -0.5089153945446014
    END: th(226215.64245334783)=-0.5089153945446014; dx=-1.7486380333731305E-7 evalInputDelta=0.05327808856964111
    Fitness changed from -0.4556373059749603 to -0.5089153945446014
    Iteration 10 complete. Error: -0.5089153945446014 Total: 10.1138; Orientation: 0.2319; Line Search: 6.5055
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/3844d7fb-7692-4f49-ba35-f36a69bef125.jpg)
    
    Final threshold in iteration 11: -0.5089153945446014 (> -Infinity) after 148.323s (< 3600.000s)
    

Returns:

    -0.5089153945446014