Code from BasicOptimizer.scala:88 executed in 569.20 seconds (2.763 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: 11213196734381
Reset training subject: 11225363381825
Adding measurement ecf673c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.711809784173965;dx=-8.485771487366343E-7
New Minimum: 8.711809784173965 > 8.711804047226906
WOLFE (weak): th(2.154434690031884)=8.711804047226906; dx=-8.470125522695366E-7 evalInputDelta=5.736947059631348E-6
New Minimum: 8.711804047226906 > 8.71179822832346
WOLFE (weak): th(4.308869380063768)=8.71179822832346; dx=-8.478916941332006E-7 evalInputDelta=1.1555850505828857E-5
New Minimum: 8.71179822832346 > 8.711775466799736
WOLFE (weak): th(12.926608140191302)=8.711775466799736; dx=-8.466944174506663E-7 evalInputDelta=3.431737422943115E-5
New Minimum: 8.711775466799736 > 8.711672380566597
WOLFE (weak): th(51.70643256076521)=8.711672380566597; dx=-8.474823087687893E-7 evalInputDelta=1.3740360736846924E-4
New Minimum: 8.711672380566597 > 8.711121335625648
WOLFE (weak): th(258.53216280382605)=8.711121335625648; dx=-8.494517879893497E-7 evalInputDelta=6.884485483169556E-4
New Minimum: 8.711121335625648 > 8.707682393491268
WOLFE (weak): th(1551.1929768229563)=8.707682393491268; dx=-8.45814637272516E-7 evalInputDelta=0.004127390682697296
New Minimum: 8.707682393491268 > 8.682976111769676
WOLFE (weak): th(10858.350837760694)=8.682976111769676; dx=-8.292792766632499E-7 evalInputDelta=0.028833672404289246
New Minimum: 8.682976111769676 > 8.482356488704681
WOLFE (weak): th(86866.80670208555)=8.482356488704681; dx=-7.86529563971641E-7 evalInputDelta=0.22945329546928406
New Minimum: 8.482356488704681 > 7.101029492914677
END: th(781801.26031877)=7.101029492914677; dx=-4.262985907435429E-7 evalInputDelta=1.6107802912592888
Fitness changed from 8.711809784173965 to 7.101029492914677
Iteration 1 complete. Error: 7.101029492914677 Total: 156.2107; Orientation: 0.0087; Line Search: 119.9056
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0977f65d-1042-4bc7-9f59-6e45d621c558.jpg)
Adding measurement 7575ea2a
...skipping 5772 bytes...
74 Total: 36.4847; Orientation: 0.2264; Line Search: 24.3263
Adding measurement 68c3ec41 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.171e+03, gradient 4.489e-04, dot -0.433; [ee73624c-d88c-40f7-898b-220e584b209b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.9044853150844574, 5.4235038459300995, 7.101029492914677, 8.711809784173965
LBFGS Accumulation History: 3 points
Removed measurement 68c3ec41 to history. Total: 3
th(0)=1.9044853150844574;dx=-1.925416486155095E-7
Armijo: th(5040000.000000001)=3.36857108771801; dx=8.888045112668797E-8 evalInputDelta=-1.4640857726335526
Armijo: th(2520000.0000000005)=2.149677410721779; dx=1.0750722316347914E-7 evalInputDelta=-0.24519209563732147
New Minimum: 1.9044853150844574 > 1.6385298669338226
END: th(840000.0000000001)=1.6385298669338226; dx=-4.050832501074964E-8 evalInputDelta=0.26595544815063477
Fitness changed from 1.9044853150844574 to 1.6385298669338226
Iteration 9 complete. Error: 1.6385298669338226 Total: 60.5917; Orientation: 0.2266; Line Search: 47.9734
Adding measurement 47e41eda to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.959e+03, gradient 3.097e-04, dot -0.537; [ee73624c-d88c-40f7-898b-220e584b209b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.6385298669338226, 5.4235038459300995, 7.101029492914677, 8.711809784173965
LBFGS Accumulation History: 3 points
Removed measurement 47e41eda to history. Total: 3
th(0)=1.6385298669338226;dx=-9.280707020842983E-8
New Minimum: 1.6385298669338226 > 1.4549653977155685
END: th(1809725.1396267826)=1.4549653977155685; dx=-1.6785185319483077E-8 evalInputDelta=0.1835644692182541
Fitness changed from 1.6385298669338226 to 1.4549653977155685
Iteration 10 complete. Error: 1.4549653977155685 Total: 36.5002; Orientation: 0.2183; Line Search: 24.3989
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a1de8686-25da-4827-b3cb-d6befb226ee8.jpg)
Final threshold in iteration 11: 1.4549653977155685 (> -Infinity) after 569.202s (< 1800.000s)
1.4549653977155685