BasicOptimizer.scala:89 executed in 87.07 seconds (0.929 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: 304473311056200
Reset training subject: 304475035099900
Adding measurement 7e6aa937 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-156.02560013117633;dx=-2.904291669158257E-5
New Minimum: -156.02560013117633 > -156.0256397046695
END: th(2.154434690031884)=-156.0256397046695; dx=-1.7726508620675768E-5 evalInputDelta=3.957349315442116E-5
Fitness changed from -156.02560013117633 to -156.0256397046695
Iteration 1 complete. Error: -156.0256397046695 Total: 8.1771; Orientation: 0.0644; Line Search: 3.2497
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/80c5b539-bca7-4851-bb49-c74a52c3ed9f.jpg)
Adding measurement 123c3894 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-156.0256397046695;dx=-1.763490859514682E-5
New Minimum: -156.0256397046695 > -156.0257386383584
WOLFE (weak): th(4.641588833612779)=-156.0257386383584; dx=-1.7619405306157727E-5 evalInputDelta=9.89336889176684E-5
New Minimum: -156.0257386383584 > -156.0258243808381
WOLFE (weak): th(9.283177667225559)=-156.0258243808381; dx=-1.760996265260925E-5 evalInputDelta=1.8467616860107228E-4
New Minimum: -156.0258243808381 > -156.0261937325195
WOLFE (weak): th(27.849533001676676)=-156.0261937325195; dx=-1.759165330210027E-5 evalInputDelta=5.540278500006934E-4
New Minimum: -156.0261937325195 > -156.0278162313349
WOLFE (weak): th(111.3981320067067)=-156.0278162313349; dx=-1.757871780542095E-5 evalInputDelta=0.0021765266654085735
New Minimum: -156.0278162313349 > -156.03648905878623
WOLFE (weak): th(556.9906600335335)=-156.03648905878623; dx=-1.7526479146056064E-5 evalInputDelta=0.01084935411674337
New Minimum: -156.03648905878623 > -156.0906849608331
WOLFE (weak): th(3341.9439602012008)=-156.0906849608331; dx=-1.756679570875675E-5 evalInputDelta=0.06504525616361434
New Minimum: -156.0906849608331 > -156.48000727258932
WOLFE (weak): th(23393.607721408407)=-156.48000727258932; dx=-1.7503171244519038E-5 evalInputDelta=0.45436756791983157
New Minimum: -156.48000727258932 > -159.59970292218378
WOLFE (weak): th(187148.86177126726)=-159.59970292218378; dx=-1.6905764704007306E-5 evalInputDelta=3.5740632175142935
New Minimum: -159.59970292218378 > -182.2491947018264
END: th(1684339.7559414054)=-182.2491947018264; dx=-1.0204781945103824E-5 evalInputDelta=26.223554997156924
Fitness changed from -156.0256397046695 to -182.2491947018264
Iteration 2 complete. Error: -182.2491947018264 Total: 18.6332; Orientation: 0.0603; Line Search: 16.4034
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b248456d-cfd0-40d7-b69c-6cb6f5ca9f8f.jpg)
Adding measurement 3fac4026 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-182.2491947018264;dx=-1.2304589405502914E-5
New Minimum: -182.2491947018264 > -212.57907205544524
END: th(3628800.0000000005)=-212.57907205544524; dx=-4.386898504271347E-6 evalInputDelta=30.329877353618826
Fitness changed from -182.2491947018264 to -212.57907205544524
Iteration 3 complete. Error: -212.57907205544524 Total: 5.2958; Orientation: 0.0694; Line Search: 3.3972
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1bef809a-17df-4e8e-9cc8-749152f171d9.jpg)
Adding measurement 4985ac87 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.353e+04, gradient 3.098e-03, dot -0.422; [874790f7-f871-4b28-a182-d8b87187cb5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -212.57907205544524, -182.2491947018264, -156.0256397046695, -156.02560013117633
LBFGS Accumulation History: 3 points
Removed measurement 4985ac87 to history. Total: 3
th(0)=-212.57907205544524;dx=-9.566930965046646E-6
New Minimum: -212.57907205544524 > -237.27256034223674
END: th(7818012.603187701)=-237.27256034223674; dx=-3.6153817115358944E-8 evalInputDelta=24.693488286791506
Fitness changed from -212.57907205544524 to -237.27256034223674
Iteration 4 complete. Error: -237.27256034223674 Total: 6.1798; Orientation: 1.1230; Line Search: 3.1681
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c9051e4f-7cfe-4285-9f0c-b793d55fe400.jpg)
Adding measurement 252ef2f4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.620e+03, gradient 3.721e-03, dot -0.159; [874790f7-f871-4b28-a182-d8b87187cb5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -237.27256034223674, -182.2491947018264, -156.0256397046695, -156.02560013117633
LBFGS Accumulation History: 3 points
Removed measurement 252ef2f4 to history. Total: 3
th(0)=-237.27256034223674;dx=-1.3843353669946928E-5
Armijo: th(1.6843397559414055E7)=-206.19855437606924; dx=3.3334282612591515E-6 evalInputDelta=-31.074005966167505
New Minimum: -237.27256034223674 > -246.60652821749292
WOLF (strong): th(8421698.779707028)=-246.60652821749292; dx=4.456402995421691E-6 evalInputDelta=9.333967875256178
New Minimum: -246.60652821749292 > -262.803669512021
END: th(2807232.926569009)=-262.803669512021; dx=-2.892152310632306E-6 evalInputDelta=25.53110916978423
Fitness changed from -237.27256034223674 to -262.803669512021
Iteration 5 complete. Error: -262.803669512021 Total: 9.7033; Orientation: 1.1624; Line Search: 6.6788
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0e6bd76c-1b26-4dfd-a5e8-726c39961083.jpg)
Adding measurement e3a298 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.318e+04, gradient 2.493e-03, dot -0.388; [874790f7-f871-4b28-a182-d8b87187cb5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -262.803669512021, -182.2491947018264, -156.0256397046695, -156.02560013117633
LBFGS Accumulation History: 3 points
Removed measurement e3a298 to history. Total: 3
th(0)=-262.803669512021;dx=-6.2090740155799735E-6
New Minimum: -262.803669512021 > -279.342027126876
END: th(6048000.000000001)=-279.342027126876; dx=-7.486516914565042E-8 evalInputDelta=16.538357614855045
Fitness changed from -262.803669512021 to -279.342027126876
Iteration 6 complete. Error: -279.342027126876 Total: 6.3880; Orientation: 1.1767; Line Search: 3.3947
Adding measurement 58fa59d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.195e+04, gradient 2.968e-03, dot -0.252; [874790f7-f871-4b28-a182-d8b87187cb5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -279.342027126876, -182.2491947018264, -156.0256397046695, -156.02560013117633
LBFGS Accumulation History: 3 points
Removed measurement 58fa59d4 to history. Total: 3
th(0)=-279.342027126876;dx=-8.811670678094176E-6
Armijo: th(1.3030021005312836E7)=-257.5150262464041; dx=3.209341322623605E-6 evalInputDelta=-21.827000880471928
New Minimum: -279.342027126876 > -284.9228573371496
WOLF (strong): th(6515010.502656418)=-284.9228573371496; dx=3.412546613711294E-6 evalInputDelta=5.580830210273575
New Minimum: -284.9228573371496 > -292.7477533171699
END: th(2171670.167552139)=-292.7477533171699; dx=-2.5005590615201975E-6 evalInputDelta=13.405726190293876
Fitness changed from -279.342027126876 to -292.7477533171699
Iteration 7 complete. Error: -292.7477533171699 Total: 9.5027; Orientation: 1.1127; Line Search: 6.7718
Adding measurement 755ff80e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.085e+04, gradient 1.907e-03, dot -0.472; [874790f7-f871-4b28-a182-d8b87187cb5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -292.7477533171699, -182.2491947018264, -156.0256397046695, -156.02560013117633
LBFGS Accumulation History: 3 points
Removed measurement 755ff80e to history. Total: 3
th(0)=-292.7477533171699;dx=-3.619753252321331E-6
New Minimum: -292.7477533171699 > -303.91526677712767
END: th(4678721.544281682)=-303.91526677712767; dx=-1.202875426425703E-6 evalInputDelta=11.167513459957775
Fitness changed from -292.7477533171699 to -303.91526677712767
Iteration 8 complete. Error: -303.91526677712767 Total: 6.0859; Orientation: 1.1108; Line Search: 3.4193
Adding measurement 56700d3a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.062e+04, gradient 2.081e-03, dot -0.386; [874790f7-f871-4b28-a182-d8b87187cb5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -303.91526677712767, -182.2491947018264, -156.0256397046695, -156.02560013117633
LBFGS Accumulation History: 3 points
Removed measurement 56700d3a to history. Total: 3
th(0)=-303.91526677712767;dx=-4.316907198775573E-6
New Minimum: -303.91526677712767 > -304.0386438409787
WOLF (strong): th(1.0080000000000002E7)=-304.0386438409787; dx=1.404511043944859E-6 evalInputDelta=0.12337706385102365
New Minimum: -304.0386438409787 > -311.02289026560834
WOLF (strong): th(5040000.000000001)=-311.02289026560834; dx=4.6470304513672664E-7 evalInputDelta=7.1076234884806695
END: th(1680000.0000000002)=-309.5588410349071; dx=-2.0740662897178555E-6 evalInputDelta=5.6435742577794485
Fitness changed from -303.91526677712767 to -311.02289026560834
Iteration 9 complete. Error: -311.02289026560834 Total: 9.3181; Orientation: 1.0649; Line Search: 6.6896
Adding measurement 689c1745 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.710e+04, gradient 2.442e-03, dot -0.273; [874790f7-f871-4b28-a182-d8b87187cb5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.02289026560834, -182.2491947018264, -156.0256397046695, -156.02560013117633
LBFGS Accumulation History: 3 points
Removed measurement 689c1745 to history. Total: 3
th(0)=-311.02289026560834;dx=-5.948208188875387E-6
New Minimum: -311.02289026560834 > -320.44678701317235
WOLF (strong): th(3619450.2792535652)=-320.44678701317235; dx=8.076258085709183E-7 evalInputDelta=9.423896747564015
END: th(1809725.1396267826)=-319.2917132493297; dx=-2.462328908527093E-6 evalInputDelta=8.26882298372135
Fitness changed from -311.02289026560834 to -320.44678701317235
Iteration 10 complete. Error: -320.44678701317235 Total: 7.4990; Orientation: 1.0614; Line Search: 4.8435
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/427852c5-1afc-493a-9a27-c28874aecedb.jpg)
Final threshold in iteration 11: -320.44678701317235 (> -Infinity) after 87.069s (< 5400.000s)
Returns
-320.44678701317235