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 403.22 seconds (2.964 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: 4081526913836
    Reset training subject: 4089618508595
    Adding measurement 76e2bb0d to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=7.270049259066582;dx=-2.1514199939924025E-7
    New Minimum: 7.270049259066582 > 7.270049050450325
    WOLFE (weak): th(2.154434690031884)=7.270049050450325; dx=-2.1237656515404324E-7 evalInputDelta=2.086162567138672E-7
    New Minimum: 7.270049050450325 > 7.270048409700394
    WOLFE (weak): th(4.308869380063768)=7.270048409700394; dx=-2.1238555584111667E-7 evalInputDelta=8.493661880493164E-7
    New Minimum: 7.270048409700394 > 7.270046591758728
    WOLFE (weak): th(12.926608140191302)=7.270046591758728; dx=-2.1237762379960398E-7 evalInputDelta=2.6673078536987305E-6
    New Minimum: 7.270046591758728 > 7.270037978887558
    WOLFE (weak): th(51.70643256076521)=7.270037978887558; dx=-2.1235146473027034E-7 evalInputDelta=1.1280179023742676E-5
    New Minimum: 7.270037978887558 > 7.2699931263923645
    WOLFE (weak): th(258.53216280382605)=7.2699931263923645; dx=-2.1242857328588772E-7 evalInputDelta=5.613267421722412E-5
    New Minimum: 7.2699931263923645 > 7.269712030887604
    WOLFE (weak): th(1551.1929768229563)=7.269712030887604; dx=-2.1238429800001652E-7 evalInputDelta=3.372281789779663E-4
    New Minimum: 7.269712030887604 > 7.267686247825623
    WOLFE (weak): th(10858.350837760694)=7.267686247825623; dx=-2.1233423906436468E-7 evalInputDelta=0.0023630112409591675
    New Minimum: 7.267686247825623 > 7.251170352101326
    WOLFE (weak): th(86866.80670208555)=7.251170352101326; dx=-2.117731360581589E-7 evalInputDelta=0.018878906965255737
    New Minimum: 7.251170352101326 > 7.102908104658127
    WOLFE (weak): th(781801.26031877)=7.102908104658127; dx=-2.0500597285634783E-7 evalInputDelta=0.1671411544084549
    New Minimum: 7.102908104658127 > 5.964738175272942
    END: th(7818012.6031877)=5.964738175272942; dx=-1.3179024632405578E-7 evalInputDelta=1.3053110837936401
    Fitness changed from 7.270049259066582 to 5.964738175272942
    Iteration 1 complete. Error: 5.964738175272942 Total: 117.

...skipping 5999 bytes...

    df-b918-d9985a82e70d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.26517316699028015, 4.550325095653534, 5.964738175272942, 7.270049259066582
    LBFGS Accumulation History: 3 points
    Removed measurement 1f09fd7c to history. Total: 3
    th(0)=-0.26517316699028015;dx=-1.2599706634948772E-8
    Armijo: th(2.268000000000001E8)=0.8675242364406586; dx=2.994203882822018E-9 evalInputDelta=-1.1326974034309387
    New Minimum: -0.26517316699028015 > -0.4070838689804077
    END: th(1.1340000000000004E8)=-0.4070838689804077; dx=-3.585148875987373E-10 evalInputDelta=0.14191070199012756
    Fitness changed from -0.26517316699028015 to -0.4070838689804077
    Iteration 9 complete. Error: -0.4070838689804077 Total: 34.1434; Orientation: 0.8091; Line Search: 25.1214
    Adding measurement 75245ea5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.117e+03, gradient 1.084e-04, dot -0.228; [5064f76f-384a-49df-b918-d9985a82e70d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.4070838689804077, 4.550325095653534, 5.964738175272942, 7.270049259066582
    LBFGS Accumulation History: 3 points
    Removed measurement 75245ea5 to history. Total: 3
    th(0)=-0.4070838689804077;dx=-1.1738756610596703E-8
    Armijo: th(2.4431289384961572E8)=1.0015291571617126; dx=3.801255409066014E-9 evalInputDelta=-1.4086130261421204
    New Minimum: -0.4070838689804077 > -0.47730007767677307
    WOLF (strong): th(1.2215644692480786E8)=-0.47730007767677307; dx=4.810431554579302E-10 evalInputDelta=0.07021620869636536
    New Minimum: -0.47730007767677307 > -0.7119275331497192
    END: th(4.071881564160262E7)=-0.7119275331497192; dx=-6.387714522249975E-9 evalInputDelta=0.3048436641693115
    Fitness changed from -0.4070838689804077 to -0.7119275331497192
    Iteration 10 complete. Error: -0.7119275331497192 Total: 41.1957; Orientation: 0.8040; Line Search: 32.5762
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/a0b9b105-9b99-46a7-b242-d19544c0f57a.jpg)
    
    Final threshold in iteration 11: -0.7119275331497192 (> -Infinity) after 403.216s (< 3600.000s)
    

Returns:

    -0.7119275331497192