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 159.50 seconds (3.664 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: 2048411677642
    Reset training subject: 2049649586599
    Adding measurement 6401a075 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.7690567672252655;dx=-5.733388295809581E-7
    New Minimum: 1.7690567672252655 > 1.7690550982952118
    WOLFE (weak): th(2.154434690031884)=1.7690550982952118; dx=-5.73393925284654E-7 evalInputDelta=1.6689300537109375E-6
    New Minimum: 1.7690550982952118 > 1.769053727388382
    WOLFE (weak): th(4.308869380063768)=1.769053727388382; dx=-5.734057651628247E-7 evalInputDelta=3.039836883544922E-6
    New Minimum: 1.769053727388382 > 1.769047424197197
    WOLFE (weak): th(12.926608140191302)=1.769047424197197; dx=-5.731895520808662E-7 evalInputDelta=9.34302806854248E-6
    New Minimum: 1.769047424197197 > 1.7690193355083466
    WOLFE (weak): th(51.70643256076521)=1.7690193355083466; dx=-5.73354647112256E-7 evalInputDelta=3.743171691894531E-5
    New Minimum: 1.7690193355083466 > 1.7688702046871185
    WOLFE (weak): th(258.53216280382605)=1.7688702046871185; dx=-5.729790151054344E-7 evalInputDelta=1.8656253814697266E-4
    New Minimum: 1.7688702046871185 > 1.76793771982193
    WOLFE (weak): th(1551.1929768229563)=1.76793771982193; dx=-5.73121428427955E-7 evalInputDelta=0.0011190474033355713
    New Minimum: 1.76793771982193 > 1.7612324953079224
    WOLFE (weak): th(10858.350837760694)=1.7612324953079224; dx=-5.721335567939984E-7 evalInputDelta=0.00782427191734314
    New Minimum: 1.7612324953079224 > 1.7072729170322418
    WOLFE (weak): th(86866.80670208555)=1.7072729170322418; dx=-5.571608003236217E-7 evalInputDelta=0.06178385019302368
    New Minimum: 1.7072729170322418 > 1.277546837925911
    END: th(781801.26031877)=1.277546837925911; dx=-4.3477570171997594E-7 evalInputDelta=0.49150992929935455
    Fitness changed from 1.7690567672252655 to 1.277546837925911
    Iteration 1 complete. Error: 1.277546837925911 Total: 15.9525; Orientation: 0.0059; Line Search: 11.8932
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/c8474106-37aa-44df-9745-3bb83052cf1e.jpg)
    
    Adding measu

...skipping 25087 bytes...

    o history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.508e+03, gradient 9.935e-05, dot -0.417; [2b03640a-c431-4016-86ab-e771b3bc2e61 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3481647074222565, 0.5951225459575653, 1.277546837925911, 1.7690567672252655
    LBFGS Accumulation History: 3 points
    Removed measurement 8e35c69 to history. Total: 3
    th(0)=-1.3481647074222565;dx=-9.847806338237245E-9
    New Minimum: -1.3481647074222565 > -1.3581563383340836
    WOLF (strong): th(2203445.2199496455)=-1.3581563383340836; dx=2.507061734628738E-9 evalInputDelta=0.009991630911827087
    END: th(1101722.6099748227)=-1.35790354013443; dx=-4.205716798642438E-9 evalInputDelta=0.009738832712173462
    Fitness changed from -1.3481647074222565 to -1.3581563383340836
    Iteration 29 complete. Error: -1.3581563383340836 Total: 4.8979; Orientation: 0.1841; Line Search: 3.5387
    Adding measurement 8cff320 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.474e+03, gradient 8.759e-05, dot -0.450; [2b03640a-c431-4016-86ab-e771b3bc2e61 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3581563383340836, 0.5951225459575653, 1.277546837925911, 1.7690567672252655
    LBFGS Accumulation History: 3 points
    Removed measurement 8cff320 to history. Total: 3
    th(0)=-1.3581563383340836;dx=-7.665335120052197E-9
    New Minimum: -1.3581563383340836 > -1.3654119819402695
    WOLF (strong): th(2373589.4097222253)=-1.3654119819402695; dx=2.097229401235888E-9 evalInputDelta=0.007255643606185913
    New Minimum: -1.3654119819402695 > -1.3658084943890572
    END: th(1186794.7048611126)=-1.3658084943890572; dx=-2.5221275295398057E-9 evalInputDelta=0.007652156054973602
    Fitness changed from -1.3581563383340836 to -1.3658084943890572
    Iteration 30 complete. Error: -1.3658084943890572 Total: 4.8455; Orientation: 0.1350; Line Search: 3.5291
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/e2de73d8-dee0-47f3-a797-ffc0485cbc4d.jpg)
    
    Final threshold in iteration 31: -1.3658084943890572 (> -Infinity) after 159.496s (< 3600.000s)
    

Returns:

    -1.3658084943890572