Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:88 executed in 50.49 seconds (2.856 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: 625675980163
Reset training subject: 627186328600
Adding measurement 697f3dd1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=36.99923476111144;dx=-1.6690709345492456E-4
New Minimum: 36.99923476111144 > 36.99830999225378
WOLFE (weak): th(2.154434690031884)=36.99830999225378; dx=-1.6325131785787126E-4 evalInputDelta=9.247688576579094E-4
New Minimum: 36.99830999225378 > 36.997384779155254
WOLFE (weak): th(4.308869380063768)=36.997384779155254; dx=-1.6664371336768018E-4 evalInputDelta=0.0018499819561839104
New Minimum: 36.997384779155254 > 36.993677942082286
WOLFE (weak): th(12.926608140191302)=36.993677942082286; dx=-1.6496220960313208E-4 evalInputDelta=0.005556819029152393
New Minimum: 36.993677942082286 > 36.977957332506776
WOLFE (weak): th(51.70643256076521)=36.977957332506776; dx=-1.6100742952740793E-4 evalInputDelta=0.02127742860466242
New Minimum: 36.977957332506776 > 36.87603918276727
WOLFE (weak): th(258.53216280382605)=36.87603918276727; dx=-1.5393398665333887E-4 evalInputDelta=0.12319557834416628
New Minimum: 36.87603918276727 > 36.36229475028813
END: th(1551.1929768229563)=36.36229475028813; dx=-1.3881989584069892E-4 evalInputDelta=0.6369400108233094
Fitness changed from 36.99923476111144 to 36.36229475028813
Iteration 1 complete. Error: 36.36229475028813 Total: 13.8616; Orientation: 0.0291; Line Search: 9.7877
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9cc44e88-e44f-46f0-a878-38719d43334f.jpg)

    Adding measurement 26a22837 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=36.36229475028813;dx=-1.3212686551350718E-4
    New Minimum: 36.36229475028813 > 35.02538680192083
    WOLFE (weak): th(3341.943960201201)=35.02538680192083; dx=-1.3861153542889148E-4 evalInputDelta=1.3369079483672976
    New Minimum: 35.02538680192083 > 33.70213917084038
    END: th(6683.887920402402)=33.70213917084038; dx=-1.0374584122323636E-4 evalInputDelta=2.6601555794477463
    Fitness changed from 36.36229475028813 to 33.70213917084038
    Iteration 2 complete. Error: 33.70213917084038 Total: 4.7857; Orientation: 0.0065; Line Search: 3.5495
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/4914518b-85c3-405d-9e2a-dbd5c0eba72c.jpg)

    Adding measurement 728ced20 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=33.70213917084038;dx=-1.3767005542714486E-4
    New Minimum: 33.70213917084038 > 28.51377560943365
    END: th(14400.000000000002)=28.51377560943365; dx=-5.33269183395368E-5 evalInputDelta=5.188363561406732
    Fitness changed from 33.70213917084038 to 28.51377560943365
    Iteration 3 complete. Error: 28.51377560943365 Total: 3.7198; Orientation: 0.0038; Line Search: 2.5686
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/e42e5e01-1818-4f37-ac4b-b7e81068f154.jpg)

    Adding measurement 7bf882f8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.264e+02, gradient 7.075e-03, dot -0.595; [b0c12a5d-a6b8-421b-b145-198f8e6753e4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 28.51377560943365, 33.70213917084038, 36.36229475028813, 36.99923476111144
    LBFGS Accumulation History: 3 points
    Removed measurement 7bf882f8 to history. Total: 3
    th(0)=28.51377560943365;dx=-4.637086741088855E-5
    New Minimum: 28.51377560943365 > 25.172184251248837
    END: th(31023.85953645913)=25.172184251248837; dx=-1.9579483304928857E-5 evalInputDelta=3.3415913581848145
    Fitness changed from 28.51377560943365 to 25.172184251248837
    Iteration 4 complete. Error: 25.172184251248837 Total: 3.7402; Orientation: 0.1071; Line Search: 2.3762
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/79500339-bc51-4053-b2d3-810f4b520cae.jpg)

    Adding measurement 3c2d096f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.941e+02, gradient 4.285e-03, dot -0.540; [b0c12a5d-a6b8-421b-b145-198f8e6753e4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 25.172184251248837, 33.70213917084038, 36.36229475028813, 36.99923476111144
    LBFGS Accumulation History: 3 points
    Removed measurement 3c2d096f to history. Total: 3
    th(0)=25.172184251248837;dx=-1.7740304570201124E-5
    New Minimum: 25.172184251248837 > 22.762801505625248
    END: th(66838.87920402404)=22.762801505625248; dx=-8.46091160560554E-6 evalInputDelta=2.4093827456235886
    Fitness changed from 25.172184251248837 to 22.762801505625248
    Iteration 5 complete. Error: 22.762801505625248 Total: 4.8154; Orientation: 0.0538; Line Search: 3.5262
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/b91b5758-63bc-45ea-b0ef-bfcccea32e6b.jpg)

    Adding measurement 5dfacdb to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.934e+02, gradient 3.410e-03, dot -0.505; [b0c12a5d-a6b8-421b-b145-198f8e6753e4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 22.762801505625248, 33.70213917084038, 36.36229475028813, 36.99923476111144
    LBFGS Accumulation History: 3 points
    Removed measurement 5dfacdb to history. Total: 3
    th(0)=22.762801505625248;dx=-1.114021652850375E-5
    New Minimum: 22.762801505625248 > 20.625788517296314
    END: th(144000.00000000006)=20.625788517296314; dx=-4.9286855095780294E-6 evalInputDelta=2.1370129883289337
    Fitness changed from 22.762801505625248 to 20.625788517296314
    Iteration 6 complete. Error: 20.625788517296314 Total: 3.7194; Orientation: 0.1409; Line Search: 2.3418
    Adding measurement 54194314 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.095e+02, gradient 3.221e-03, dot -0.419; [b0c12a5d-a6b8-421b-b145-198f8e6753e4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 20.625788517296314, 33.70213917084038, 36.36229475028813, 36.99923476111144
    LBFGS Accumulation History: 3 points
    Removed measurement 54194314 to history. Total: 3
    th(0)=20.625788517296314;dx=-9.856421583020432E-6
    New Minimum: 20.625788517296314 > 18.203996792435646
    END: th(310238.5953645914)=18.203996792435646; dx=-2.5180536879244927E-6 evalInputDelta=2.421791724860668
    Fitness changed from 20.625788517296314 to 18.203996792435646
    Iteration 7 complete. Error: 18.203996792435646 Total: 3.7876; Orientation: 0.1156; Line Search: 2.4496
    Adding measurement e05f17b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.042e+02, gradient 2.331e-03, dot -0.415; [b0c12a5d-a6b8-421b-b145-198f8e6753e4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 18.203996792435646, 33.70213917084038, 36.36229475028813, 36.99923476111144
    LBFGS Accumulation History: 3 points
    Removed measurement e05f17b to history. Total: 3
    th(0)=18.203996792435646;dx=-5.261549759509708E-6
    New Minimum: 18.203996792435646 > 14.935357861220837
    END: th(668388.7920402405)=14.935357861220837; dx=-1.2594620899417742E-6 evalInputDelta=3.2686389312148094
    Fitness changed from 18.203996792435646 to 14.935357861220837
    Iteration 8 complete. Error: 14.935357861220837 Total: 3.7211; Orientation: 0.1185; Line Search: 2.4418
    Adding measurement 138cf282 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.369e+02, gradient 1.463e-03, dot -0.463; [b0c12a5d-a6b8-421b-b145-198f8e6753e4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 14.935357861220837, 33.70213917084038, 36.36229475028813, 36.99923476111144
    LBFGS Accumulation History: 3 points
    Removed measurement 138cf282 to history. Total: 3
    th(0)=14.935357861220837;dx=-2.0927084256508998E-6
    New Minimum: 14.935357861220837 > 11.75536946952343
    END: th(1440000.0000000007)=11.75536946952343; dx=-5.839442995896765E-7 evalInputDelta=3.1799883916974068
    Fitness changed from 14.935357861220837 to 11.75536946952343
    Iteration 9 complete. Error: 11.75536946952343 Total: 3.6612; Orientation: 0.1485; Line Search: 2.3641
    Adding measurement d5f3389 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.801e+02, gradient 1.151e-03, dot -0.407; [b0c12a5d-a6b8-421b-b145-198f8e6753e4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 11.75536946952343, 33.70213917084038, 36.36229475028813, 36.99923476111144
    LBFGS Accumulation History: 3 points
    Removed measurement d5f3389 to history. Total: 3
    th(0)=11.75536946952343;dx=-1.276460955072801E-6
    New Minimum: 11.75536946952343 > 9.779126763343811
    END: th(3102385.9536459143)=9.779126763343811; dx=-1.2004752425861394E-7 evalInputDelta=1.9762427061796188
    Fitness changed from 11.75536946952343 to 9.779126763343811
    Iteration 10 complete. Error: 9.779126763343811 Total: 4.6432; Orientation: 0.0634; Line Search: 3.3565
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/11f6fd64-633f-49fb-985a-6d330060a2e6.jpg)

    Final threshold in iteration 11: 9.779126763343811 (> -Infinity) after 50.469s (< 1800.000s)

Returns

    9.779126763343811