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 362.63 seconds (4.314 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: 4131325616714
    Reset training subject: 4133887154400
    Adding measurement 3d5fb597 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.8402940183877945;dx=-1.509608880633215E-7
    New Minimum: 1.8402940183877945 > 1.840293437242508
    WOLFE (weak): th(2.154434690031884)=1.840293437242508; dx=-1.484544923053077E-7 evalInputDelta=5.811452865600586E-7
    New Minimum: 1.840293437242508 > 1.8402928560972214
    WOLFE (weak): th(4.308869380063768)=1.8402928560972214; dx=-1.484661487433234E-7 evalInputDelta=1.1622905731201172E-6
    New Minimum: 1.8402928560972214 > 1.8402905017137527
    WOLFE (weak): th(12.926608140191302)=1.8402905017137527; dx=-1.4842357283008463E-7 evalInputDelta=3.516674041748047E-6
    New Minimum: 1.8402905017137527 > 1.84028060734272
    WOLFE (weak): th(51.70643256076521)=1.84028060734272; dx=-1.4820548620452496E-7 evalInputDelta=1.341104507446289E-5
    New Minimum: 1.84028060734272 > 1.8402266204357147
    WOLFE (weak): th(258.53216280382605)=1.8402266204357147; dx=-1.4854982158614265E-7 evalInputDelta=6.739795207977295E-5
    New Minimum: 1.8402266204357147 > 1.8398909717798233
    WOLFE (weak): th(1551.1929768229563)=1.8398909717798233; dx=-1.4845691844493636E-7 evalInputDelta=4.030466079711914E-4
    New Minimum: 1.8398909717798233 > 1.8374736309051514
    WOLFE (weak): th(10858.350837760694)=1.8374736309051514; dx=-1.484200498939238E-7 evalInputDelta=0.0028203874826431274
    New Minimum: 1.8374736309051514 > 1.8177829533815384
    WOLFE (weak): th(86866.80670208555)=1.8177829533815384; dx=-1.4750367936601937E-7 evalInputDelta=0.022511065006256104
    New Minimum: 1.8177829533815384 > 1.6455033719539642
    END: th(781801.26031877)=1.6455033719539642; dx=-1.3572270249563472E-7 evalInputDelta=0.19479064643383026
    Fitness changed from 1.8402940183877945 to 1.6455033719539642
    Iteration 1 complete. Error: 1.6455033719539642 Total: 38.0137; Orientation: 0.0143; Line Search: 29.6142
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/656f909b-2272-40bb-9491-b8f00ded2b5b.j

...skipping 24437 bytes...

    dient 3.128e-05, dot -0.455; [f830d619-defd-4a0a-8ffa-ebec12376607 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6380134299397469, 1.2972646951675415, 1.6455033719539642, 1.8402940183877945
    LBFGS Accumulation History: 3 points
    Removed measurement 6385287e to history. Total: 3
    th(0)=-1.6380134299397469;dx=-9.735881292361238E-10
    New Minimum: -1.6380134299397469 > -1.6420965790748596
    WOLF (strong): th(1.5668943786308588E7)=-1.6420965790748596; dx=1.5237390576289745E-10 evalInputDelta=0.0040831491351127625
    New Minimum: -1.6420965790748596 > -1.6441806703805923
    END: th(7834471.893154294)=-1.6441806703805923; dx=-2.393621000370136E-10 evalInputDelta=0.0061672404408454895
    Fitness changed from -1.6380134299397469 to -1.6441806703805923
    Iteration 29 complete. Error: -1.6441806703805923 Total: 12.2982; Orientation: 0.3325; Line Search: 8.3331
    Adding measurement 21567ef9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.307e+03, gradient 3.107e-05, dot -0.459; [f830d619-defd-4a0a-8ffa-ebec12376607 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6441806703805923, 1.2972646951675415, 1.6455033719539642, 1.8402940183877945
    LBFGS Accumulation History: 3 points
    Removed measurement 21567ef9 to history. Total: 3
    th(0)=-1.6441806703805923;dx=-9.634057515745927E-10
    New Minimum: -1.6441806703805923 > -1.6452874168753624
    WOLF (strong): th(1.6878858024691377E7)=-1.6452874168753624; dx=2.064139486012846E-10 evalInputDelta=0.00110674649477005
    New Minimum: -1.6452874168753624 > -1.6491857320070267
    END: th(8439429.012345688)=-1.6491857320070267; dx=-1.147562392893113E-10 evalInputDelta=0.005005061626434326
    Fitness changed from -1.6441806703805923 to -1.6491857320070267
    Iteration 30 complete. Error: -1.6491857320070267 Total: 10.9167; Orientation: 0.3258; Line Search: 7.8331
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/69449860-d9b3-400a-ae4b-9e384866c47c.jpg)
    
    Final threshold in iteration 31: -1.6491857320070267 (> -Infinity) after 362.625s (< 3600.000s)
    

Returns:

    -1.6491857320070267