Code from BasicOptimizer.scala:75 executed in 465.19 seconds (5.087 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 912146256566800
Reset training subject: 912149793033000
Adding measurement 5f057b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.4676664546132088;dx=-1.311484598813303E-6
New Minimum: 2.4676664546132088 > 2.467665258795023
WOLFE (weak): th(2.154434690031884)=2.467665258795023; dx=-1.311347341111331E-6 evalInputDelta=1.1958181858062744E-6
New Minimum: 2.467665258795023 > 2.4676628708839417
WOLFE (weak): th(4.308869380063768)=2.4676628708839417; dx=-1.3113747854945385E-6 evalInputDelta=3.5837292671203613E-6
New Minimum: 2.4676628708839417 > 2.4676540084183216
WOLFE (weak): th(12.926608140191302)=2.4676540084183216; dx=-1.3113245785351269E-6 evalInputDelta=1.2446194887161255E-5
New Minimum: 2.4676540084183216 > 2.467616181820631
WOLFE (weak): th(51.70643256076521)=2.467616181820631; dx=-1.3112826897534477E-6 evalInputDelta=5.027279257774353E-5
New Minimum: 2.467616181820631 > 2.4674143716692924
WOLFE (weak): th(258.53216280382605)=2.4674143716692924; dx=-1.3094738151912644E-6 evalInputDelta=2.520829439163208E-4
New Minimum: 2.4674143716692924 > 2.466158591210842
WOLFE (weak): th(1551.1929768229563)=2.466158591210842; dx=-1.2979784235286187E-6 evalInputDelta=0.0015078634023666382
New Minimum: 2.466158591210842 > 2.457456026226282
WOLFE (weak): th(10858.350837760694)=2.457456026226282; dx=-1.2028681427913587E-6 evalInputDelta=0.010210428386926651
New Minimum: 2.457456026226282 > 2.4042289182543755
END: th(86866.80670208555)=2.4042289182543755; dx=-7.660385819574432E-7 evalInputDelta=0.06343753635883331
Fitness changed from 2.4676664546132088 to 2.4042289182543755
Iteration 1 complete. Error: 2.4042289182543755 Total: 42.4074; Orientation: 0.0641; Line Search: 31.9989
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7d4e1109-986b-462d-b174-871c533f93dc.jpg)
Adding measurement 9c4379a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=2.4042289182543755;dx=-1.8751785654744144E-6
...skipping 24289 bytes...
ejected. Popping history element from -0.5208520591259003, -0.5250748842954636, -0.5284712240099907, -0.5309038832783699
LBFGS Accumulation History: 3 points
Removed measurement 5682488f to history. Total: 4
th(0)=-0.5309038832783699;dx=-9.480060282073685E-11
Armijo: th(2.5070310058093745E8)=-0.5250478237867355; dx=6.576254278558009E-11 evalInputDelta=-0.005856059491634369
New Minimum: -0.5309038832783699 > -0.5333752781152725
WOLF (strong): th(1.2535155029046872E8)=-0.5333752781152725; dx=7.954071546590048E-12 evalInputDelta=0.0024713948369026184
END: th(4.178385009682291E7)=-0.5331996083259583; dx=-5.6166574568702664E-11 evalInputDelta=0.0022957250475883484
Fitness changed from -0.5309038832783699 to -0.5333752781152725
Iteration 29 complete. Error: -0.5333752781152725 Total: 19.5257; Orientation: 1.7716; Line Search: 14.3335
Adding measurement 1419ae81 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.853e+03, gradient 1.166e-05, dot -0.551; [daa3315f-aff9-4f7c-a6ca-07a70e439ddf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.5250748842954636, -0.5284712240099907, -0.5309038832783699, -0.5333752781152725
LBFGS Accumulation History: 3 points
Removed measurement 507ae2bd to history. Total: 4
th(0)=-0.5333752781152725;dx=-1.3591145831925517E-10
New Minimum: -0.5333752781152725 > -0.5360833331942558
WOLF (strong): th(9.002057613168736E7)=-0.5360833331942558; dx=8.80627329579412E-12 evalInputDelta=0.002708055078983307
New Minimum: -0.5360833331942558 > -0.5363029539585114
END: th(4.501028806584368E7)=-0.5363029539585114; dx=-3.8595295743148775E-11 evalInputDelta=0.0029276758432388306
Fitness changed from -0.5333752781152725 to -0.5363029539585114
Iteration 30 complete. Error: -0.5363029539585114 Total: 16.3510; Orientation: 1.7569; Line Search: 11.2054
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/6c2c247d-4f9d-4dd5-9885-fb4a0c5d9954.jpg)
Final threshold in iteration 31: -0.5363029539585114 (> -Infinity) after 465.188s (< 3600.000s)
-0.5363029539585114