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 627.19 seconds (4.391 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: 1059300662467
    Reset training subject: 1073310878011
    Adding measurement 6a0a4c98 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=9.98335299640894;dx=-3.693086348019462E-7
    New Minimum: 9.98335299640894 > 9.98335176706314
    WOLFE (weak): th(2.154434690031884)=9.98335176706314; dx=-3.6781280416643474E-7 evalInputDelta=1.2293457984924316E-6
    New Minimum: 9.98335176706314 > 9.98334988951683
    WOLFE (weak): th(4.308869380063768)=9.98334988951683; dx=-3.6964985371423843E-7 evalInputDelta=3.1068921089172363E-6
    New Minimum: 9.98334988951683 > 9.983343720436096
    WOLFE (weak): th(12.926608140191302)=9.983343720436096; dx=-3.694855349798888E-7 evalInputDelta=9.275972843170166E-6
    New Minimum: 9.983343720436096 > 9.983316376805305
    WOLFE (weak): th(51.70643256076521)=9.983316376805305; dx=-3.6650210173832437E-7 evalInputDelta=3.6619603633880615E-5
    New Minimum: 9.983316376805305 > 9.983166791498661
    WOLFE (weak): th(258.53216280382605)=9.983166791498661; dx=-3.6382253793329936E-7 evalInputDelta=1.862049102783203E-4
    New Minimum: 9.983166791498661 > 9.982233971357346
    WOLFE (weak): th(1551.1929768229563)=9.982233971357346; dx=-3.672077682953384E-7 evalInputDelta=0.0011190250515937805
    New Minimum: 9.982233971357346 > 9.975510574877262
    WOLFE (weak): th(10858.350837760694)=9.975510574877262; dx=-3.6402494644065586E-7 evalInputDelta=0.007842421531677246
    New Minimum: 9.975510574877262 > 9.920757807791233
    WOLFE (weak): th(86866.80670208555)=9.920757807791233; dx=-3.630622189825891E-7 evalInputDelta=0.0625951886177063
    New Minimum: 9.920757807791233 > 9.438298918306828
    END: th(781801.26031877)=9.438298918306828; dx=-2.997751044368566E-7 evalInputDelta=0.5450540781021118
    Fitness changed from 9.98335299640894 to 9.438298918306828
    Iteration 1 complete. Error: 9.438298918306828 Total: 180.1935; Orientation: 0.0109; Line Search: 138.2893
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/4f73c2a5-1708-4637-95b8-b16929602c70.jpg)
    
    Adding measurement 710e787

...skipping 5438 bytes...

    265226364 Total: 55.1373; Orientation: 0.2490; Line Search: 41.4540
    Adding measurement 7135ba13 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.806e+03, gradient 2.784e-04, dot -0.189; [4951bb9b-1ab4-4bd3-9985-a1e999bf2663 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.530765265226364, 8.494192339479923, 9.438298918306828, 9.98335299640894
    LBFGS Accumulation History: 3 points
    Removed measurement 7135ba13 to history. Total: 3
    th(0)=2.530765265226364;dx=-7.58203060988655E-8
    Armijo: th(4.536000000000001E7)=4.94058595597744; dx=1.6306217813684724E-8 evalInputDelta=-2.4098206907510757
    Armijo: th(2.2680000000000004E7)=2.7292740046977997; dx=1.3696103051387498E-9 evalInputDelta=-0.19850873947143555
    New Minimum: 2.530765265226364 > 2.2086747139692307
    END: th(7560000.000000001)=2.2086747139692307; dx=-2.931715960124598E-8 evalInputDelta=0.3220905512571335
    Fitness changed from 2.530765265226364 to 2.2086747139692307
    Iteration 9 complete. Error: 2.2086747139692307 Total: 68.9664; Orientation: 0.2518; Line Search: 55.1301
    Adding measurement e478954 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.113e+03, gradient 2.059e-04, dot -0.233; [4951bb9b-1ab4-4bd3-9985-a1e999bf2663 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.2086747139692307, 8.494192339479923, 9.438298918306828, 9.98335299640894
    LBFGS Accumulation History: 3 points
    Removed measurement e478954 to history. Total: 3
    th(0)=2.2086747139692307;dx=-4.0830089199562995E-8
    New Minimum: 2.2086747139692307 > 1.918207049369812
    END: th(1.6287526256641043E7)=1.918207049369812; dx=-1.5122696467802888E-8 evalInputDelta=0.29046766459941864
    Fitness changed from 2.2086747139692307 to 1.918207049369812
    Iteration 10 complete. Error: 1.918207049369812 Total: 42.8158; Orientation: 0.2436; Line Search: 28.8387
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/70cec45a-3427-4d22-bd1a-2cbcd660faf0.jpg)
    
    Final threshold in iteration 11: 1.918207049369812 (> -Infinity) after 627.188s (< 1800.000s)
    

Returns:

    1.918207049369812