BasicOptimizer.scala:89 executed in 85.11 seconds (1.210 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: 305926983328300
Reset training subject: 305928714140700
Adding measurement f01b38f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-154.89605436721936;dx=-2.778838440460086E-5
New Minimum: -154.89605436721936 > -154.89610087297154
END: th(2.154434690031884)=-154.89610087297154; dx=-1.7972084377654986E-5 evalInputDelta=4.6505752180792115E-5
Fitness changed from -154.89605436721936 to -154.89610087297154
Iteration 1 complete. Error: -154.89610087297154 Total: 8.3647; Orientation: 0.0619; Line Search: 3.2103
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a6e795ef-1ad2-48ee-98c6-4eb1af7a5a88.jpg)
Adding measurement 7d3534ed to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-154.89610087297154;dx=-1.7871009560708554E-5
New Minimum: -154.89610087297154 > -154.896193884434
WOLFE (weak): th(4.641588833612779)=-154.896193884434; dx=-1.78198786359381E-5 evalInputDelta=9.301146246798453E-5
New Minimum: -154.896193884434 > -154.8962868958406
WOLFE (weak): th(9.283177667225559)=-154.8962868958406; dx=-1.7834874772035955E-5 evalInputDelta=1.8602286905888832E-4
New Minimum: -154.8962868958406 > -154.89665229725446
WOLFE (weak): th(27.849533001676676)=-154.89665229725446; dx=-1.7820734401015182E-5 evalInputDelta=5.514242829178784E-4
New Minimum: -154.89665229725446 > -154.8983065583251
WOLFE (weak): th(111.3981320067067)=-154.8983065583251; dx=-1.7810999053917103E-5 evalInputDelta=0.0022056853535445953
New Minimum: -154.8983065583251 > -154.90709576964883
WOLFE (weak): th(556.9906600335335)=-154.90709576964883; dx=-1.780299803328685E-5 evalInputDelta=0.010994896677289034
New Minimum: -154.90709576964883 > -154.96204526965587
WOLFE (weak): th(3341.9439602012008)=-154.96204526965587; dx=-1.781219869687615E-5 evalInputDelta=0.06594439668432983
New Minimum: -154.96204526965587 > -155.35704434389277
WOLFE (weak): th(23393.607721408407)=-155.35704434389277; dx=-1.772866289837927E-5 evalInputDelta=0.46094347092122234
New Minimum: -155.35704434389277 > -158.52622824403917
WOLFE (weak): th(187148.86177126726)=-158.52622824403917; dx=-1.7191722940260565E-5 evalInputDelta=3.63012737106763
New Minimum: -158.52622824403917 > -181.58434825138332
END: th(1684339.7559414054)=-181.58434825138332; dx=-1.0360921860592486E-5 evalInputDelta=26.688247378411774
Fitness changed from -154.89610087297154 to -181.58434825138332
Iteration 2 complete. Error: -181.58434825138332 Total: 18.1494; Orientation: 0.0626; Line Search: 16.1871
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/26b3fc32-72e3-4da5-b2b2-ef8773b2a97a.jpg)
Adding measurement 7b42dea1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-181.58434825138332;dx=-1.2400464531805095E-5
New Minimum: -181.58434825138332 > -212.32336572004945
END: th(3628800.0000000005)=-212.32336572004945; dx=-4.315296839611909E-6 evalInputDelta=30.739017468666134
Fitness changed from -181.58434825138332 to -212.32336572004945
Iteration 3 complete. Error: -212.32336572004945 Total: 5.2026; Orientation: 0.0616; Line Search: 3.2776
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/62e73bc8-8ef4-405e-9e61-34e789680e5b.jpg)
Adding measurement 1adbbbbc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.279e+04, gradient 3.167e-03, dot -0.404; [5f5083f6-495d-43ec-abc7-3a4004f77b8b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -212.32336572004945, -181.58434825138332, -154.89610087297154, -154.89605436721936
LBFGS Accumulation History: 3 points
Removed measurement 1adbbbbc to history. Total: 3
th(0)=-212.32336572004945;dx=-1.0022974228431614E-5
New Minimum: -212.32336572004945 > -235.22967345080787
WOLF (strong): th(7818012.603187701)=-235.22967345080787; dx=4.0947616691953833E-7 evalInputDelta=22.906307730758414
END: th(3909006.3015938504)=-233.7082507726276; dx=-1.862507103910372E-6 evalInputDelta=21.38488505257814
Fitness changed from -212.32336572004945 to -235.22967345080787
Iteration 4 complete. Error: -235.22967345080787 Total: 7.9143; Orientation: 1.1040; Line Search: 4.8728
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/730607bc-7570-4fe0-9e84-acd8fe4c4939.jpg)
Adding measurement f011489 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.528e+03, gradient 3.958e-03, dot -0.141; [5f5083f6-495d-43ec-abc7-3a4004f77b8b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -235.22967345080787, -181.58434825138332, -154.89610087297154, -154.89605436721936
LBFGS Accumulation History: 3 points
Removed measurement f011489 to history. Total: 3
th(0)=-235.22967345080787;dx=-1.5666730922912207E-5
New Minimum: -235.22967345080787 > -243.03204387099223
WOLF (strong): th(8421698.779707028)=-243.03204387099223; dx=5.449835499058903E-6 evalInputDelta=7.80237042018436
New Minimum: -243.03204387099223 > -264.6292376102041
WOLF (strong): th(4210849.389853514)=-264.6292376102041; dx=1.428859826448894E-6 evalInputDelta=29.39956415939622
END: th(1403616.4632845046)=-254.7158003089962; dx=-9.377492835013874E-6 evalInputDelta=19.486126858188328
Fitness changed from -235.22967345080787 to -264.6292376102041
Iteration 5 complete. Error: -264.6292376102041 Total: 9.8160; Orientation: 1.0482; Line Search: 6.6805
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/035c94c1-6150-426d-92a4-90bec2aa7bb2.jpg)
Adding measurement 32af8682 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.794e+04, gradient 3.181e-03, dot -0.235; [5f5083f6-495d-43ec-abc7-3a4004f77b8b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -264.6292376102041, -181.58434825138332, -154.89610087297154, -154.89605436721936
LBFGS Accumulation History: 3 points
Removed measurement 32af8682 to history. Total: 3
th(0)=-264.6292376102041;dx=-1.0105149066129461E-5
New Minimum: -264.6292376102041 > -282.90328606689155
END: th(3024000.0000000005)=-282.90328606689155; dx=-1.3116151423178275E-6 evalInputDelta=18.274048456687467
Fitness changed from -264.6292376102041 to -282.90328606689155
Iteration 6 complete. Error: -282.90328606689155 Total: 6.3468; Orientation: 1.0300; Line Search: 3.4406
Adding measurement 4065bb9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.047e+04, gradient 2.358e-03, dot -0.414; [5f5083f6-495d-43ec-abc7-3a4004f77b8b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -282.90328606689155, -181.58434825138332, -154.89610087297154, -154.89605436721936
LBFGS Accumulation History: 3 points
Removed measurement 4065bb9c to history. Total: 3
th(0)=-282.90328606689155;dx=-5.5545341423588E-6
New Minimum: -282.90328606689155 > -294.96499833227404
WOLF (strong): th(6515010.502656418)=-294.96499833227404; dx=6.947422705123475E-7 evalInputDelta=12.061712265382482
END: th(3257505.251328209)=-294.6983319392; dx=-1.5343699577925656E-6 evalInputDelta=11.795045872308435
Fitness changed from -282.90328606689155 to -294.96499833227404
Iteration 7 complete. Error: -294.96499833227404 Total: 7.7711; Orientation: 1.0202; Line Search: 5.1575
Adding measurement f2fabd0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.139e+04, gradient 3.150e-03, dot -0.201; [5f5083f6-495d-43ec-abc7-3a4004f77b8b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -294.96499833227404, -181.58434825138332, -154.89610087297154, -154.89605436721936
LBFGS Accumulation History: 3 points
Removed measurement f2fabd0 to history. Total: 3
th(0)=-294.96499833227404;dx=-9.91949493454242E-6
Armijo: th(7018082.316422524)=-294.18683021852337; dx=5.102540784751969E-6 evalInputDelta=-0.7781681137506666
New Minimum: -294.96499833227404 > -310.40698232705336
WOLF (strong): th(3509041.158211262)=-310.40698232705336; dx=1.3346056411534793E-6 evalInputDelta=15.44198399477932
END: th(1169680.3860704207)=-305.28983020656835; dx=-6.067951429141749E-6 evalInputDelta=10.324831874294318
Fitness changed from -294.96499833227404 to -310.40698232705336
Iteration 8 complete. Error: -310.40698232705336 Total: 9.0999; Orientation: 1.0095; Line Search: 6.4911
Adding measurement a3b55e9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.056e+04, gradient 2.341e-03, dot -0.321; [5f5083f6-495d-43ec-abc7-3a4004f77b8b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -310.40698232705336, -181.58434825138332, -154.89610087297154, -154.89605436721936
LBFGS Accumulation History: 3 points
Removed measurement a3b55e9 to history. Total: 3
th(0)=-310.40698232705336;dx=-5.47266319869638E-6
New Minimum: -310.40698232705336 > -319.4638914901931
END: th(2520000.000000001)=-319.4638914901931; dx=-1.350778562687025E-6 evalInputDelta=9.056909163139721
Fitness changed from -310.40698232705336 to -319.4638914901931
Iteration 9 complete. Error: -319.4638914901931 Total: 5.9028; Orientation: 1.0228; Line Search: 3.3348
Adding measurement 607bd76a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.481e+04, gradient 1.699e-03, dot -0.462; [5f5083f6-495d-43ec-abc7-3a4004f77b8b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -319.4638914901931, -181.58434825138332, -154.89610087297154, -154.89605436721936
LBFGS Accumulation History: 3 points
Removed measurement 607bd76a to history. Total: 3
th(0)=-319.4638914901931;dx=-2.8791952572956814E-6
New Minimum: -319.4638914901931 > -328.27803997866084
END: th(5429175.418880349)=-328.27803997866084; dx=-6.191277705829231E-7 evalInputDelta=8.814148488467765
Fitness changed from -319.4638914901931 to -328.27803997866084
Iteration 10 complete. Error: -328.27803997866084 Total: 6.2074; Orientation: 0.9819; Line Search: 3.1765
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/34e17ebe-99e7-47c9-bef1-8bbc207c4f0b.jpg)
Final threshold in iteration 11: -328.27803997866084 (> -Infinity) after 85.107s (< 5400.000s)
Returns
-328.27803997866084