BasicOptimizer.scala:89 executed in 135.51 seconds (1.501 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
Reset training subject: 327235476179700
Reset training subject: 327238149516400
Adding measurement 14270916 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-110.64810263443383;dx=-2.5466786856185982E-5
New Minimum: -110.64810263443383 > -110.64815493494467
END: th(2.154434690031884)=-110.64815493494467; dx=-2.078142404515937E-5 evalInputDelta=5.230051084481602E-5
Fitness changed from -110.64810263443383 to -110.64815493494467
Iteration 1 complete. Error: -110.64815493494467 Total: 13.0124; Orientation: 0.0642; Line Search: 5.2408
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6713c0bb-ff65-4c43-b25c-b9ebda9ad666.jpg)
Adding measurement 618eac09 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-110.64815493494467;dx=-2.0696301438415183E-5
New Minimum: -110.64815493494467 > -110.64826389426285
WOLFE (weak): th(4.641588833612779)=-110.64826389426285; dx=-2.0698600719205655E-5 evalInputDelta=1.0895931818311055E-4
New Minimum: -110.64826389426285 > -110.64837285347375
WOLFE (weak): th(9.283177667225559)=-110.64837285347375; dx=-2.069276364709163E-5 evalInputDelta=2.17918529074268E-4
New Minimum: -110.64837285347375 > -110.64879997254579
WOLFE (weak): th(27.849533001676676)=-110.64879997254579; dx=-2.069527201878715E-5 evalInputDelta=6.450376011173375E-4
New Minimum: -110.64879997254579 > -110.65073070451437
WOLFE (weak): th(111.3981320067067)=-110.65073070451437; dx=-2.0695194247283576E-5 evalInputDelta=0.002575769569702402
New Minimum: -110.65073070451437 > -110.66104189898661
WOLFE (weak): th(556.9906600335335)=-110.66104189898661; dx=-2.068896579954583E-5 evalInputDelta=0.012886964041939564
New Minimum: -110.66104189898661 > -110.72541937847795
WOLFE (weak): th(3341.9439602012008)=-110.72541937847795; dx=-2.0664516413126356E-5 evalInputDelta=0.07726444353328077
New Minimum: -110.72541937847795 > -111.18700674892746
WOLFE (weak): th(23393.607721408407)=-111.18700674892746; dx=-2.0507336577386627E-5 evalInputDelta=0.538851813982788
New Minimum: -111.18700674892746 > -114.8019384546485
WOLFE (weak): th(187148.86177126726)=-114.8019384546485; dx=-1.895898438490736E-5 evalInputDelta=4.153783519703836
New Minimum: -114.8019384546485 > -134.01776625128358
END: th(1684339.7559414054)=-134.01776625128358; dx=-5.443287946081228E-6 evalInputDelta=23.369611316338904
Fitness changed from -110.64815493494467 to -134.01776625128358
Iteration 2 complete. Error: -134.01776625128358 Total: 29.2301; Orientation: 0.0636; Line Search: 25.9532
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6b370ba3-5c3a-4635-a58c-8af7e5736ad8.jpg)
Adding measurement 2471b31f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-134.01776625128358;dx=-9.617850218537837E-6
New Minimum: -134.01776625128358 > -150.9319611277684
END: th(3628800.0000000005)=-150.9319611277684; dx=-6.225813132381984E-7 evalInputDelta=16.914194876484828
Fitness changed from -134.01776625128358 to -150.9319611277684
Iteration 3 complete. Error: -150.9319611277684 Total: 8.1517; Orientation: 0.0644; Line Search: 5.1698
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/371e18bb-93a4-4571-b06e-03327360eb89.jpg)
Adding measurement 56ca41a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.148e+03, gradient 3.409e-03, dot -0.310; [6d983144-535d-4c72-a232-ca906b7518c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -150.9319611277684, -134.01776625128358, -110.64815493494467, -110.64810263443383
LBFGS Accumulation History: 3 points
Removed measurement 56ca41a4 to history. Total: 3
th(0)=-150.9319611277684;dx=-1.1622342539592785E-5
Armijo: th(7818012.603187701)=-143.03965783255495; dx=4.005273972052193E-6 evalInputDelta=-7.892303295213452
New Minimum: -150.9319611277684 > -160.17577133856258
WOLF (strong): th(3909006.3015938504)=-160.17577133856258; dx=2.8740811153516503E-6 evalInputDelta=9.24381021079418
New Minimum: -160.17577133856258 > -161.81818871806624
END: th(1303002.1005312835)=-161.81818871806624; dx=-3.6984808745748043E-6 evalInputDelta=10.886227590297835
Fitness changed from -150.9319611277684 to -161.81818871806624
Iteration 4 complete. Error: -161.81818871806624 Total: 14.7084; Orientation: 1.1835; Line Search: 10.5318
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e2cc9765-2f61-4062-a582-1176ae317b67.jpg)
Adding measurement 1fd2960f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.215e+04, gradient 2.282e-03, dot -0.566; [6d983144-535d-4c72-a232-ca906b7518c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -161.81818871806624, -134.01776625128358, -110.64815493494467, -110.64810263443383
LBFGS Accumulation History: 3 points
Removed measurement 1fd2960f to history. Total: 3
th(0)=-161.81818871806624;dx=-5.20105679549437E-6
New Minimum: -161.81818871806624 > -172.6672527316441
END: th(2807232.926569009)=-172.6672527316441; dx=-2.176419986565826E-6 evalInputDelta=10.849064013577873
Fitness changed from -161.81818871806624 to -172.6672527316441
Iteration 5 complete. Error: -172.6672527316441 Total: 9.3603; Orientation: 1.1141; Line Search: 5.3184
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/41e81677-b6f4-4412-a19f-ff923c154454.jpg)
Adding measurement 3f83dddd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.735e+04, gradient 2.379e-03, dot -0.536; [6d983144-535d-4c72-a232-ca906b7518c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -172.6672527316441, -134.01776625128358, -110.64815493494467, -110.64810263443383
LBFGS Accumulation History: 3 points
Removed measurement 3f83dddd to history. Total: 3
th(0)=-172.6672527316441;dx=-5.641482046239482E-6
New Minimum: -172.6672527316441 > -178.55379607827828
WOLF (strong): th(6048000.000000001)=-178.55379607827828; dx=1.1504908246734102E-6 evalInputDelta=5.88654334663417
New Minimum: -178.55379607827828 > -180.7441856431677
END: th(3024000.0000000005)=-180.7441856431677; dx=-3.733548671702001E-7 evalInputDelta=8.076932911523585
Fitness changed from -172.6672527316441 to -180.7441856431677
Iteration 6 complete. Error: -180.7441856431677 Total: 11.9706; Orientation: 1.0442; Line Search: 7.9194
Adding measurement 750968c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.974e+04, gradient 2.699e-03, dot -0.420; [6d983144-535d-4c72-a232-ca906b7518c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -180.7441856431677, -134.01776625128358, -110.64815493494467, -110.64810263443383
LBFGS Accumulation History: 3 points
Removed measurement 750968c to history. Total: 3
th(0)=-180.7441856431677;dx=-7.279300428264665E-6
Armijo: th(6515010.502656418)=-174.469802232836; dx=3.7678024860572E-6 evalInputDelta=-6.274383410331694
New Minimum: -180.7441856431677 > -187.31526873849907
WOLF (strong): th(3257505.251328209)=-187.31526873849907; dx=2.1880430091726597E-6 evalInputDelta=6.571083095331375
END: th(1085835.0837760696)=-187.19606161476602; dx=-3.4423357169559093E-6 evalInputDelta=6.4518759715983265
Fitness changed from -180.7441856431677 to -187.31526873849907
Iteration 7 complete. Error: -187.31526873849907 Total: 14.0064; Orientation: 1.0716; Line Search: 10.3738
Adding measurement 223c2115 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.636e+04, gradient 3.162e-03, dot -0.276; [6d983144-535d-4c72-a232-ca906b7518c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -187.31526873849907, -134.01776625128358, -110.64815493494467, -110.64810263443383
LBFGS Accumulation History: 3 points
Removed measurement 223c2115 to history. Total: 3
th(0)=-187.31526873849907;dx=-9.9944702745265E-6
New Minimum: -187.31526873849907 > -196.94535679228
WOLF (strong): th(2339360.772140841)=-196.94535679228; dx=1.8294602762067577E-6 evalInputDelta=9.630088053780923
END: th(1169680.3860704205)=-196.23895329973712; dx=-3.5790103459227426E-6 evalInputDelta=8.923684561238048
Fitness changed from -187.31526873849907 to -196.94535679228
Iteration 8 complete. Error: -196.94535679228 Total: 11.5635; Orientation: 1.0355; Line Search: 7.7545
Adding measurement 7dfda09b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.684e+04, gradient 2.457e-03, dot -0.429; [6d983144-535d-4c72-a232-ca906b7518c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -196.94535679228, -134.01776625128358, -110.64815493494467, -110.64810263443383
LBFGS Accumulation History: 3 points
Removed measurement 7dfda09b to history. Total: 3
th(0)=-196.94535679228;dx=-6.030481923789808E-6
New Minimum: -196.94535679228 > -204.05443344834208
WOLF (strong): th(2520000.0000000005)=-204.05443344834208; dx=6.400299215121221E-7 evalInputDelta=7.109076656062086
END: th(1260000.0000000002)=-202.93577559842197; dx=-2.583365699445827E-6 evalInputDelta=5.9904188061419745
Fitness changed from -196.94535679228 to -204.05443344834208
Iteration 9 complete. Error: -204.05443344834208 Total: 11.3755; Orientation: 1.0945; Line Search: 7.7261
Adding measurement 5e8b253d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.814e+04, gradient 2.286e-03, dot -0.439; [6d983144-535d-4c72-a232-ca906b7518c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -204.05443344834208, -134.01776625128358, -110.64815493494467, -110.64810263443383
LBFGS Accumulation History: 3 points
Removed measurement 5e8b253d to history. Total: 3
th(0)=-204.05443344834208;dx=-5.21981743177974E-6
New Minimum: -204.05443344834208 > -209.5113000536205
WOLF (strong): th(2714587.709440174)=-209.5113000536205; dx=9.633347590942059E-7 evalInputDelta=5.456866605278407
END: th(1357293.854720087)=-209.2347490057463; dx=-1.790950704218182E-6 evalInputDelta=5.180315557404214
Fitness changed from -204.05443344834208 to -209.5113000536205
Iteration 10 complete. Error: -209.5113000536205 Total: 11.6430; Orientation: 1.0322; Line Search: 8.0048
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/56fd689e-3a2e-4719-badd-7ceff2577eec.jpg)
Final threshold in iteration 11: -209.5113000536205 (> -Infinity) after 135.507s (< 5400.000s)
Returns
-209.5113000536205