Code from BasicOptimizer.scala:88 executed in 163.29 seconds (3.045 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: 3144025163874
Reset training subject: 3148478905747
Adding measurement 6f6d67f0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=34.995694909244776;dx=-7.71486703898961E-5
New Minimum: 34.995694909244776 > 34.995071433484554
WOLFE (weak): th(2.154434690031884)=34.995071433484554; dx=-7.97095144406089E-5 evalInputDelta=6.234757602214813E-4
New Minimum: 34.995071433484554 > 34.994445310905576
WOLFE (weak): th(4.308869380063768)=34.994445310905576; dx=-7.868833397301685E-5 evalInputDelta=0.0012495983392000198
New Minimum: 34.994445310905576 > 34.99194341339171
WOLFE (weak): th(12.926608140191302)=34.99194341339171; dx=-7.805530541879798E-5 evalInputDelta=0.0037514958530664444
New Minimum: 34.99194341339171 > 34.99187955074012
WOLFE (weak): th(51.70643256076521)=34.99187955074012; dx=-7.739604640535776E-5 evalInputDelta=0.003815358504652977
New Minimum: 34.99187955074012 > 34.93169863615185
WOLFE (weak): th(258.53216280382605)=34.93169863615185; dx=-7.936379894400914E-5 evalInputDelta=0.06399627309292555
New Minimum: 34.93169863615185 > 34.53240857459605
WOLFE (weak): th(1551.1929768229563)=34.53240857459605; dx=-8.259414527162691E-5 evalInputDelta=0.46328633464872837
New Minimum: 34.53240857459605 > 31.34366223309189
END: th(10858.350837760694)=31.34366223309189; dx=-5.970880521451863E-5 evalInputDelta=3.652032676152885
Fitness changed from 34.995694909244776 to 31.34366223309189
Iteration 1 complete. Error: 31.34366223309189 Total: 45.2801; Orientation: 0.0316; Line Search: 32.6703
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e68c7556-4a72-49c2-a887-d08fc13603a7.jpg)
Adding measurement 700bdbf1 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=31.34366223309189;dx=-8.147130185623869E-5
New Minimum: 31.34366223309189 > 25.91003691777587
END: th(23393.607721408407)=25.91003691777587; dx=-2.9187605940683843E-5 evalInputDelta=5.433625315316021
Fitness changed from 31.34366223309189 to 25.91003691777587
...skipping 4791 bytes...
ror: 8.608919084072113 Total: 11.9890; Orientation: 0.2267; Line Search: 7.8676
Adding measurement 3256e698 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.860e+02, gradient 1.146e-03, dot -0.211; [4121d2f5-f056-4f9e-a13f-61a2523a8bb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 8.608919084072113, 25.91003691777587, 31.34366223309189, 34.995694909244776
LBFGS Accumulation History: 3 points
Removed measurement 3256e698 to history. Total: 3
th(0)=8.608919084072113;dx=-1.1760895320570824E-6
Armijo: th(5040000.000000002)=14.36293950676918; dx=2.6789698561758393E-7 evalInputDelta=-5.754020422697067
Armijo: th(2520000.000000001)=9.24141900241375; dx=6.325444427401018E-8 evalInputDelta=-0.6324999183416367
New Minimum: 8.608919084072113 > 7.107904717326164
END: th(840000.0000000003)=7.107904717326164; dx=-3.411787472152732E-7 evalInputDelta=1.5010143667459488
Fitness changed from 8.608919084072113 to 7.107904717326164
Iteration 9 complete. Error: 7.107904717326164 Total: 21.1305; Orientation: 0.2050; Line Search: 17.0404
Adding measurement d3e7952 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.958e+02, gradient 8.570e-04, dot -0.206; [4121d2f5-f056-4f9e-a13f-61a2523a8bb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.107904717326164, 25.91003691777587, 31.34366223309189, 34.995694909244776
LBFGS Accumulation History: 3 points
Removed measurement d3e7952 to history. Total: 3
th(0)=7.107904717326164;dx=-6.089617542885028E-7
New Minimum: 7.107904717326164 > 6.1121252328157425
END: th(1809725.139626783)=6.1121252328157425; dx=-2.1233734640579794E-7 evalInputDelta=0.9957794845104218
Fitness changed from 7.107904717326164 to 6.1121252328157425
Iteration 10 complete. Error: 6.1121252328157425 Total: 12.3846; Orientation: 0.2292; Line Search: 8.2506
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/69d0c27b-fc44-4fac-9be4-5c7eaf7388fa.jpg)
Final threshold in iteration 11: 6.1121252328157425 (> -Infinity) after 163.268s (< 1800.000s)
6.1121252328157425