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

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:88 executed in 1438.83 seconds (13.554 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: 9724011015715
    Reset training subject: 9735185491266
    Adding measurement 6a644eb3 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.7056838870048523;dx=-1.2465403071978385E-7
    New Minimum: 3.7056838870048523 > 3.705683797597885
    WOLFE (weak): th(2.154434690031884)=3.705683797597885; dx=-1.243968510985139E-7 evalInputDelta=8.940696716308594E-8
    New Minimum: 3.705683797597885 > 3.705683082342148
    WOLFE (weak): th(4.308869380063768)=3.705683082342148; dx=-1.2439500148339824E-7 evalInputDelta=8.046627044677734E-7
    New Minimum: 3.705683082342148 > 3.7056815326213837
    WOLFE (weak): th(12.926608140191302)=3.7056815326213837; dx=-1.2439592461167522E-7 evalInputDelta=2.3543834686279297E-6
    New Minimum: 3.7056815326213837 > 3.705674394965172
    WOLFE (weak): th(51.70643256076521)=3.705674394965172; dx=-1.2438187919563853E-7 evalInputDelta=9.492039680480957E-6
    New Minimum: 3.705674394965172 > 3.7056368738412857
    WOLFE (weak): th(258.53216280382605)=3.7056368738412857; dx=-1.2438842460175454E-7 evalInputDelta=4.7013163566589355E-5
    New Minimum: 3.7056368738412857 > 3.7054026126861572
    WOLFE (weak): th(1551.1929768229563)=3.7054026126861572; dx=-1.2439112556167975E-7 evalInputDelta=2.8127431869506836E-4
    New Minimum: 3.7054026126861572 > 3.7037142664194107
    WOLFE (weak): th(10858.350837760694)=3.7037142664194107; dx=-1.243859233669854E-7 evalInputDelta=0.0019696205854415894
    New Minimum: 3.7037142664194107 > 3.6899313777685165
    WOLFE (weak): th(86866.80670208555)=3.6899313777685165; dx=-1.243006545813362E-7 evalInputDelta=0.015752509236335754
    New Minimum: 3.6899313777685165 > 3.564320057630539
    WOLFE (weak): th(781801.26031877)=3.564320057630539; dx=-1.2310074354731212E-7 evalInputDelta=0.14136382937431335
    New Minimum: 3.564320057630539 > 2.4418021589517593
    END: th(7818012.6031877)=2.4418021589517593; dx=-9.267534759844853E-8 evalInputDelta=1.263881728053093
    Fitness changed from 3.7056838870048523 to 2.4418021589517593
    Iteration 1 complete. Error: 2.44180215895

...skipping 24775 bytes...

    radient 1.613e-05, dot -0.330; [0351eb4a-fd8b-43cb-a6e5-ae01dccd12b7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.5712087601423264, 0.8133180886507034, 2.4418021589517593, 3.7056838870048523
    LBFGS Accumulation History: 3 points
    Removed measurement 73bf0062 to history. Total: 3
    th(0)=-2.5712087601423264;dx=-2.600491891600599E-10
    Armijo: th(2.3503415679462886E8)=-2.543370522558689; dx=1.5395895570601807E-10 evalInputDelta=-0.027838237583637238
    Armijo: th(1.1751707839731443E8)=-2.5682355351746082; dx=6.532925533025265E-11 evalInputDelta=-0.0029732249677181244
    New Minimum: -2.5712087601423264 > -2.574656330049038
    WOLF (strong): th(3.9172359465771474E7)=-2.574656330049038; dx=7.425263996565121E-12 evalInputDelta=0.0034475699067115784
    END: th(9793089.866442868)=-2.573713432997465; dx=-1.44413138675702E-10 evalInputDelta=0.0025046728551387787
    Fitness changed from -2.5712087601423264 to -2.574656330049038
    Iteration 29 complete. Error: -2.574656330049038 Total: 71.2999; Orientation: 1.5271; Line Search: 58.3171
    Adding measurement 11ff3036 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.292e+02, gradient 1.173e-05, dot -0.357; [0351eb4a-fd8b-43cb-a6e5-ae01dccd12b7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.574656330049038, 0.8133180886507034, 2.4418021589517593, 3.7056838870048523
    LBFGS Accumulation History: 3 points
    Removed measurement 11ff3036 to history. Total: 3
    th(0)=-2.574656330049038;dx=-1.3735809756960692E-10
    New Minimum: -2.574656330049038 > -2.5768033266067505
    END: th(2.1098572530864224E7)=-2.5768033266067505; dx=-6.607607843892004E-11 evalInputDelta=0.002146996557712555
    Fitness changed from -2.574656330049038 to -2.5768033266067505
    Iteration 30 complete. Error: -2.5768033266067505 Total: 35.4341; Orientation: 1.5227; Line Search: 22.9194
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/1b439cdc-7563-48a1-9330-89f7244bf8a1.jpg)
    
    Final threshold in iteration 31: -2.5768033266067505 (> -Infinity) after 1438.829s (< 3600.000s)
    

Returns:

    -2.5768033266067505