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 61.66 seconds (3.220 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: 2017631838049
    Reset training subject: 2018877922571
    Adding measurement 4e2f07d5 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=10.579725466668606;dx=-3.2924027567983797E-5
    New Minimum: 10.579725466668606 > 10.57965463399887
    WOLFE (weak): th(2.154434690031884)=10.57965463399887; dx=-3.292314973202174E-5 evalInputDelta=7.083266973495483E-5
    New Minimum: 10.57965463399887 > 10.57958360761404
    WOLFE (weak): th(4.308869380063768)=10.57958360761404; dx=-3.2921840652915896E-5 evalInputDelta=1.418590545654297E-4
    New Minimum: 10.57958360761404 > 10.579299986362457
    WOLFE (weak): th(12.926608140191302)=10.579299986362457; dx=-3.292097989338599E-5 evalInputDelta=4.2548030614852905E-4
    New Minimum: 10.579299986362457 > 10.578023917973042
    WOLFE (weak): th(51.70643256076521)=10.578023917973042; dx=-3.290582076950287E-5 evalInputDelta=0.00170154869556427
    New Minimum: 10.578023917973042 > 10.571224823594093
    WOLFE (weak): th(258.53216280382605)=10.571224823594093; dx=-3.2852882634563836E-5 evalInputDelta=0.008500643074512482
    New Minimum: 10.571224823594093 > 10.528953649103642
    WOLFE (weak): th(1551.1929768229563)=10.528953649103642; dx=-3.257648246498132E-5 evalInputDelta=0.050771817564964294
    New Minimum: 10.528953649103642 > 10.235227890312672
    WOLFE (weak): th(10858.350837760694)=10.235227890312672; dx=-3.0571622573018864E-5 evalInputDelta=0.34449757635593414
    New Minimum: 10.235227890312672 > 8.512574657797813
    END: th(86866.80670208555)=8.512574657797813; dx=-1.599340155574261E-5 evalInputDelta=2.0671508088707924
    Fitness changed from 10.579725466668606 to 8.512574657797813
    Iteration 1 complete. Error: 8.512574657797813 Total: 16.2441; Orientation: 0.0035; Line Search: 12.3466
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/2f198769-60d6-42cf-b451-dce0099f24a1.jpg)
    
    Adding measurement 7851dc91 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=8.512574657797813;dx=-1.2211679938678212E-5
    New Minimum: 8.512574657797813 > 6

...skipping 5606 bytes...

    7759606838226
    Iteration 8 complete. Error: 2.8157759606838226 Total: 8.8892; Orientation: 0.0769; Line Search: 5.1117
    Adding measurement aef017c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.675e+02, gradient 1.123e-03, dot -0.429; [c809bf57-c912-4b59-ab58-d00d326b4c94 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.8157759606838226, 6.915620021522045, 8.512574657797813, 10.579725466668606
    LBFGS Accumulation History: 3 points
    Removed measurement aef017c to history. Total: 3
    th(0)=2.8157759606838226;dx=-1.2617379420626499E-6
    New Minimum: 2.8157759606838226 > 2.6304141879081726
    WOLF (strong): th(560000.0000000002)=2.6304141879081726; dx=4.658995243103584E-7 evalInputDelta=0.18536177277565002
    New Minimum: 2.6304141879081726 > 2.5977447777986526
    END: th(280000.0000000001)=2.5977447777986526; dx=-3.098904428874118E-7 evalInputDelta=0.21803118288516998
    Fitness changed from 2.8157759606838226 to 2.5977447777986526
    Iteration 9 complete. Error: 2.5977447777986526 Total: 5.0823; Orientation: 0.0737; Line Search: 3.7226
    Adding measurement 42cc336d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.507e+02, gradient 5.446e-04, dot -0.675; [c809bf57-c912-4b59-ab58-d00d326b4c94 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.5977447777986526, 6.915620021522045, 8.512574657797813, 10.579725466668606
    LBFGS Accumulation History: 3 points
    Removed measurement 42cc336d to history. Total: 3
    th(0)=2.5977447777986526;dx=-2.965954949879811E-7
    New Minimum: 2.5977447777986526 > 2.4508472234010696
    END: th(603241.7132089278)=2.4508472234010696; dx=-2.0054375647615985E-7 evalInputDelta=0.146897554397583
    Fitness changed from 2.5977447777986526 to 2.4508472234010696
    Iteration 10 complete. Error: 2.4508472234010696 Total: 3.8605; Orientation: 0.0755; Line Search: 2.5103
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/f3be9b24-ba6b-4df6-8ed4-eaf20c95869b.jpg)
    
    Final threshold in iteration 11: 2.4508472234010696 (> -Infinity) after 61.655s (< 3600.000s)
    

Returns:

    2.4508472234010696