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 394.88 seconds (3.602 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: 5017566241703
    Reset training subject: 5025954499967
    Adding measurement 1c97c2d2 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=7.722515776753426;dx=-2.2056807220519277E-7
    New Minimum: 7.722515776753426 > 7.722515523433685
    WOLFE (weak): th(2.154434690031884)=7.722515523433685; dx=-2.1744379514694314E-7 evalInputDelta=2.5331974029541016E-7
    New Minimum: 7.722515523433685 > 7.722514852881432
    WOLFE (weak): th(4.308869380063768)=7.722514852881432; dx=-2.1744861083287007E-7 evalInputDelta=9.238719940185547E-7
    New Minimum: 7.722514852881432 > 7.7225131541490555
    WOLFE (weak): th(12.926608140191302)=7.7225131541490555; dx=-2.1746583921191964E-7 evalInputDelta=2.6226043701171875E-6
    New Minimum: 7.7225131541490555 > 7.722504675388336
    WOLFE (weak): th(51.70643256076521)=7.722504675388336; dx=-2.1719291358764235E-7 evalInputDelta=1.1101365089416504E-5
    New Minimum: 7.722504675388336 > 7.722458034753799
    WOLFE (weak): th(258.53216280382605)=7.722458034753799; dx=-2.1744877707405417E-7 evalInputDelta=5.774199962615967E-5
    New Minimum: 7.722458034753799 > 7.722168207168579
    WOLFE (weak): th(1551.1929768229563)=7.722168207168579; dx=-2.174141383590269E-7 evalInputDelta=3.475695848464966E-4
    New Minimum: 7.722168207168579 > 7.720083862543106
    WOLFE (weak): th(10858.350837760694)=7.720083862543106; dx=-2.1733595816195314E-7 evalInputDelta=0.002431914210319519
    New Minimum: 7.720083862543106 > 7.703098624944687
    WOLFE (weak): th(86866.80670208555)=7.703098624944687; dx=-2.1672368158958648E-7 evalInputDelta=0.01941715180873871
    New Minimum: 7.703098624944687 > 7.5508531630039215
    WOLFE (weak): th(781801.26031877)=7.5508531630039215; dx=-2.0934287003742475E-7 evalInputDelta=0.1716626137495041
    New Minimum: 7.5508531630039215 > 6.3970149755477905
    END: th(7818012.6031877)=6.3970149755477905; dx=-1.3247176263553428E-7 evalInputDelta=1.325500801205635
    Fitness changed from 7.722515776753426 to 6.3970149755477905
    Iteration 1 complete. Error: 6.3970149755477905 Total:

...skipping 5893 bytes...

    3
    Rejected: LBFGS Orientation magnitude: 9.416e+03, gradient 1.199e-04, dot -0.244; [614b3155-7a4a-4e53-9343-a217fd22d920 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.06432369351387024, 4.965115129947662, 6.3970149755477905, 7.722515776753426
    LBFGS Accumulation History: 3 points
    Removed measurement 5e1f4753 to history. Total: 3
    th(0)=0.06432369351387024;dx=-1.4350502986342237E-8
    Armijo: th(2.268000000000001E8)=1.4664442837238312; dx=3.895982064018533E-9 evalInputDelta=-1.402120590209961
    New Minimum: 0.06432369351387024 > -0.009772241115570068
    WOLF (strong): th(1.1340000000000004E8)=-0.009772241115570068; dx=4.2389722252140137E-10 evalInputDelta=0.07409593462944031
    New Minimum: -0.009772241115570068 > -0.25805842876434326
    END: th(3.7800000000000015E7)=-0.25805842876434326; dx=-7.490064620915816E-9 evalInputDelta=0.3223821222782135
    Fitness changed from 0.06432369351387024 to -0.25805842876434326
    Iteration 9 complete. Error: -0.25805842876434326 Total: 41.2502; Orientation: 0.8092; Line Search: 32.6060
    Adding measurement 68456e40 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.916e+03, gradient 9.132e-05, dot -0.276; [614b3155-7a4a-4e53-9343-a217fd22d920 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.25805842876434326, 4.965115129947662, 6.3970149755477905, 7.722515776753426
    LBFGS Accumulation History: 3 points
    Removed measurement 68456e40 to history. Total: 3
    th(0)=-0.25805842876434326;dx=-8.325619197184911E-9
    New Minimum: -0.25805842876434326 > -0.46718862652778625
    END: th(8.143763128320524E7)=-0.46718862652778625; dx=-3.2877560148444755E-9 evalInputDelta=0.209130197763443
    Fitness changed from -0.25805842876434326 to -0.46718862652778625
    Iteration 10 complete. Error: -0.46718862652778625 Total: 25.4619; Orientation: 0.8092; Line Search: 16.2284
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/1bef7723-280b-4328-9a1a-2bdcc9737147.jpg)
    
    Final threshold in iteration 11: -0.46718862652778625 (> -Infinity) after 394.880s (< 3600.000s)
    

Returns:

    -0.46718862652778625