Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

Code from BasicOptimizer.scala:75 executed in 29.05 seconds (0.614 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    IterativeTrainer.wrap(trainable)
      .setOrientation(orientation())
      .setMonitor(new TrainingMonitor() {
        override def clear(): Unit = trainingMonitor.clear()
  
        override def log(msg: String): Unit = trainingMonitor.log(msg)
  
        override def onStepFail(currentPoint: Step): Boolean = {
          BasicOptimizer.this.onStepFail(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, currentPoint)
          trainingMonitor.onStepComplete(currentPoint)
          super.onStepComplete(currentPoint)
        }
      })
      .setTimeout(trainingMinutes, TimeUnit.MINUTES)
      .setMaxIterations(trainingIterations)
      .setLineSearchFactory((_: CharSequence) => lineSearchInstance)
      .setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
      .runAndFree
      .asInstanceOf[lang.Double]

Logging:

    Reset training subject: 907448888755000
    Reset training subject: 907449318313800
    Adding measurement 3e7e4aea to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.987019270658493;dx=-6.859084322288491E-7
    New Minimum: 1.987019270658493 > 1.9870180636644363
    WOLFE (weak): th(2.154434690031884)=1.9870180636644363; dx=-6.85931443539106E-7 evalInputDelta=1.2069940567016602E-6
    New Minimum: 1.9870180636644363 > 1.9870170950889587
    WOLFE (weak): th(4.308869380063768)=1.9870170950889587; dx=-6.859311081738168E-7 evalInputDelta=2.175569534301758E-6
    New Minimum: 1.9870170950889587 > 1.9870127141475677
    WOLFE (weak): th(12.926608140191302)=1.9870127141475677; dx=-6.859293098452819E-7 evalInputDelta=6.556510925292969E-6
    New Minimum: 1.9870127141475677 > 1.9869939684867859
    WOLFE (weak): th(51.70643256076521)=1.9869939684867859; dx=-6.859320983154643E-7 evalInputDelta=2.530217170715332E-5
    New Minimum: 1.9869939684867859 > 1.9868931770324707
    WOLFE (weak): th(258.53216280382605)=1.9868931770324707; dx=-6.859673848004543E-7 evalInputDelta=1.2609362602233887E-4
    New Minimum: 1.9868931770324707 > 1.9862615764141083
    WOLFE (weak): th(1551.1929768229563)=1.9862615764141083; dx=-6.861297153082146E-7 evalInputDelta=7.576942443847656E-4
    New Minimum: 1.9862615764141083 > 1.981659471988678
    WOLFE (weak): th(10858.350837760694)=1.981659471988678; dx=-6.87079594051782E-7 evalInputDelta=0.0053597986698150635
    New Minimum: 1.981659471988678 > 1.9413227438926697
    WOLFE (weak): th(86866.80670208555)=1.9413227438926697; dx=-6.825472655552758E-7 evalInputDelta=0.045696526765823364
    New Minimum: 1.9413227438926697 > 1.5301021039485931
    END: th(781801.26031877)=1.5301021039485931; dx=-4.537490634501653E-7 evalInputDelta=0.4569171667098999
    Fitness changed from 1.987019270658493 to 1.5301021039485931
    Iteration 1 complete. Error: 1.5301021039485931 Total: 5.4781; Orientation: 0.0034; Line Search: 4.3133
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/7d17dd02-56e1-4

...skipping 10645 bytes...

     rejected. Popping history element from -0.42498360574245453, -0.4296325147151947, -0.4345935583114624, -0.4388703554868698
    LBFGS Accumulation History: 3 points
    Removed measurement 56d3e4a9 to history. Total: 4
    th(0)=-0.4388703554868698;dx=-6.095528182165134E-10
    Armijo: th(3.898934620234735E7)=-0.43632835149765015; dx=2.176201562096287E-10 evalInputDelta=-0.0025420039892196655
    New Minimum: -0.4388703554868698 > -0.44201724231243134
    END: th(1.9494673101173677E7)=-0.44201724231243134; dx=-1.3370908670941444E-10 evalInputDelta=0.0031468868255615234
    Fitness changed from -0.4388703554868698 to -0.44201724231243134
    Iteration 14 complete. Error: -0.44201724231243134 Total: 1.8087; Orientation: 0.1062; Line Search: 1.2878
    Adding measurement 4b6b9255 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.533e+02, gradient 2.744e-05, dot -0.619; [cbb1e8df-fb75-42f8-97bb-513841944385 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.4296325147151947, -0.4345935583114624, -0.4388703554868698, -0.44201724231243134
    LBFGS Accumulation History: 3 points
    Removed measurement 136cd71b to history. Total: 4
    th(0)=-0.44201724231243134;dx=-7.529712028438271E-10
    Armijo: th(4.2000000000000015E7)=-0.42744846642017365; dx=8.287354062883302E-10 evalInputDelta=-0.01456877589225769
    New Minimum: -0.44201724231243134 > -0.4438439905643463
    WOLF (strong): th(2.1000000000000007E7)=-0.4438439905643463; dx=1.1800736881143786E-10 evalInputDelta=0.001826748251914978
    New Minimum: -0.4438439905643463 > -0.4448222145438194
    END: th(7000000.000000003)=-0.4448222145438194; dx=-4.5491016586753777E-10 evalInputDelta=0.002804972231388092
    Fitness changed from -0.44201724231243134 to -0.4448222145438194
    Iteration 15 complete. Error: -0.4448222145438194 Total: 2.1986; Orientation: 0.1031; Line Search: 1.6834
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/24fa96da-b5f8-4e9d-8a9b-354f67635277.jpg)
    
    Final threshold in iteration 16: -0.4448222145438194 (> -Infinity) after 29.051s (< 1800.000s)
    

Returns:

    -0.4448222145438194