Code from BasicOptimizer.scala:88 executed in 583.19 seconds (3.647 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: 4697809720178
Reset training subject: 4709980294597
Adding measurement 704ad8ac to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=10.700072154402733;dx=-1.1864920771197285E-6
New Minimum: 10.700072154402733 > 10.7000633738935
WOLFE (weak): th(2.154434690031884)=10.7000633738935; dx=-1.1768834368355162E-6 evalInputDelta=8.780509233474731E-6
New Minimum: 10.7000633738935 > 10.700054179877043
WOLFE (weak): th(4.308869380063768)=10.700054179877043; dx=-1.1758957398248216E-6 evalInputDelta=1.7974525690078735E-5
New Minimum: 10.700054179877043 > 10.700019262731075
WOLFE (weak): th(12.926608140191302)=10.700019262731075; dx=-1.1624965023107109E-6 evalInputDelta=5.2891671657562256E-5
New Minimum: 10.700019262731075 > 10.69986279308796
WOLFE (weak): th(51.70643256076521)=10.69986279308796; dx=-1.1846967337330335E-6 evalInputDelta=2.0936131477355957E-4
New Minimum: 10.69986279308796 > 10.699021801352501
WOLFE (weak): th(258.53216280382605)=10.699021801352501; dx=-1.1719255131531332E-6 evalInputDelta=0.0010503530502319336
New Minimum: 10.699021801352501 > 10.693773720413446
WOLFE (weak): th(1551.1929768229563)=10.693773720413446; dx=-1.1892830456525902E-6 evalInputDelta=0.006298433989286423
New Minimum: 10.693773720413446 > 10.656056117266417
WOLFE (weak): th(10858.350837760694)=10.656056117266417; dx=-1.1833049543412242E-6 evalInputDelta=0.0440160371363163
New Minimum: 10.656056117266417 > 10.354049269109964
WOLFE (weak): th(86866.80670208555)=10.354049269109964; dx=-1.136253245102136E-6 evalInputDelta=0.3460228852927685
New Minimum: 10.354049269109964 > 8.466035023331642
END: th(781801.26031877)=8.466035023331642; dx=-5.117309576813652E-7 evalInputDelta=2.2340371310710907
Fitness changed from 10.700072154402733 to 8.466035023331642
Iteration 1 complete. Error: 8.466035023331642 Total: 158.3034; Orientation: 0.0145; Line Search: 121.1014
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5e21028e-26d6-40ff-9a5c-6c506062384b.jpg)
...skipping 6063 bytes...
930361509323
Iteration 8 complete. Error: 2.6114930361509323 Total: 60.1664; Orientation: 0.2250; Line Search: 48.1081
Adding measurement 1aea0b7b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.770e+03, gradient 3.934e-04, dot -0.435; [3ca03431-3fc3-474d-a414-4e1dca0abb42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.6114930361509323, 6.29342582821846, 8.466035023331642, 10.700072154402733
LBFGS Accumulation History: 3 points
Removed measurement 1aea0b7b to history. Total: 3
th(0)=2.6114930361509323;dx=-1.491536107467127E-7
New Minimum: 2.6114930361509323 > 2.3433976471424103
END: th(1260000.0000000002)=2.3433976471424103; dx=-1.4641954182390728E-8 evalInputDelta=0.26809538900852203
Fitness changed from 2.6114930361509323 to 2.3433976471424103
Iteration 9 complete. Error: 2.3433976471424103 Total: 36.9786; Orientation: 0.2151; Line Search: 24.9238
Adding measurement 58719807 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.948e+03, gradient 3.010e-04, dot -0.525; [3ca03431-3fc3-474d-a414-4e1dca0abb42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.3433976471424103, 6.29342582821846, 8.466035023331642, 10.700072154402733
LBFGS Accumulation History: 3 points
Removed measurement 58719807 to history. Total: 3
th(0)=2.3433976471424103;dx=-8.632421524430721E-8
New Minimum: 2.3433976471424103 > 2.196837544441223
WOLF (strong): th(2714587.709440174)=2.196837544441223; dx=4.002516354429511E-9 evalInputDelta=0.14656010270118713
New Minimum: 2.196837544441223 > 2.123448431491852
END: th(1357293.854720087)=2.123448431491852; dx=-2.946929653010307E-8 evalInputDelta=0.21994921565055847
Fitness changed from 2.3433976471424103 to 2.123448431491852
Iteration 10 complete. Error: 2.123448431491852 Total: 48.1945; Orientation: 0.4076; Line Search: 35.7543
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b787513a-fd28-4ec3-870a-18989b4a35f9.jpg)
Final threshold in iteration 11: 2.123448431491852 (> -Infinity) after 583.184s (< 1800.000s)
2.123448431491852