Code from BasicOptimizer.scala:88 executed in 444.09 seconds (6.729 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: 3818941634637
Reset training subject: 3827218745794
Adding measurement 623d9245 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=7.844045892357826;dx=-7.585903441143419E-8
New Minimum: 7.844045892357826 > 7.8440457582473755
WOLFE (weak): th(2.154434690031884)=7.8440457582473755; dx=-7.587207737938194E-8 evalInputDelta=1.341104507446289E-7
New Minimum: 7.8440457582473755 > 7.844045348465443
WOLFE (weak): th(4.308869380063768)=7.844045348465443; dx=-7.587406006058365E-8 evalInputDelta=5.438923835754395E-7
New Minimum: 7.844045348465443 > 7.844044089317322
WOLFE (weak): th(12.926608140191302)=7.844044089317322; dx=-7.587110023347175E-8 evalInputDelta=1.8030405044555664E-6
New Minimum: 7.844044089317322 > 7.844039782881737
WOLFE (weak): th(51.70643256076521)=7.844039782881737; dx=-7.587105047283869E-8 evalInputDelta=6.109476089477539E-6
New Minimum: 7.844039782881737 > 7.844016283750534
WOLFE (weak): th(258.53216280382605)=7.844016283750534; dx=-7.586568236911669E-8 evalInputDelta=2.9608607292175293E-5
New Minimum: 7.844016283750534 > 7.843869775533676
WOLFE (weak): th(1551.1929768229563)=7.843869775533676; dx=-7.586656802300357E-8 evalInputDelta=1.7611682415008545E-4
New Minimum: 7.843869775533676 > 7.842813767492771
WOLFE (weak): th(10858.350837760694)=7.842813767492771; dx=-7.585157536837344E-8 evalInputDelta=0.0012321248650550842
New Minimum: 7.842813767492771 > 7.834184341132641
WOLFE (weak): th(86866.80670208555)=7.834184341132641; dx=-7.586867751132935E-8 evalInputDelta=0.009861551225185394
New Minimum: 7.834184341132641 > 7.754750318825245
WOLFE (weak): th(781801.26031877)=7.754750318825245; dx=-7.561742440987915E-8 evalInputDelta=0.08929557353258133
New Minimum: 7.754750318825245 > 6.95370152592659
END: th(7818012.6031877)=6.95370152592659; dx=-6.517633478963907E-8 evalInputDelta=0.8903443664312363
Fitness changed from 7.844045892357826 to 6.95370152592659
Iteration 1 complete. Error: 6.95370152592659 Total: 126.7893; Orient
...skipping 6069 bytes...
673e+03, gradient 4.420e-05, dot -0.272; [4dd2351c-bb6c-4260-b2ce-d220de8e6ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.21202412247657776, 5.261696539819241, 6.95370152592659, 7.844045892357826
LBFGS Accumulation History: 3 points
Removed measurement cd1e822 to history. Total: 3
th(0)=-0.21202412247657776;dx=-1.950559746543671E-9
New Minimum: -0.21202412247657776 > -0.2844650596380234
END: th(1.5120000000000006E8)=-0.2844650596380234; dx=-2.330037559897729E-10 evalInputDelta=0.07244093716144562
Fitness changed from -0.21202412247657776 to -0.2844650596380234
Iteration 9 complete. Error: -0.2844650596380234 Total: 27.6024; Orientation: 0.9538; Line Search: 18.0085
Adding measurement cce84a3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.347e+03, gradient 6.074e-05, dot -0.300; [4dd2351c-bb6c-4260-b2ce-d220de8e6ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.2844650596380234, 5.261696539819241, 6.95370152592659, 7.844045892357826
LBFGS Accumulation History: 3 points
Removed measurement cce84a3 to history. Total: 3
th(0)=-0.2844650596380234;dx=-3.6873735727225606E-9
Armijo: th(3.2575052513282096E8)=3.367328494787216; dx=1.4405766047611171E-8 evalInputDelta=-3.6517935544252396
Armijo: th(1.6287526256641048E8)=0.33168065547943115; dx=5.824382473243401E-9 evalInputDelta=-0.6161457151174545
New Minimum: -0.2844650596380234 > -0.3790822774171829
WOLF (strong): th(5.4291754188803494E7)=-0.3790822774171829; dx=2.698362924782784E-10 evalInputDelta=0.09461721777915955
END: th(1.3572938547200873E7)=-0.34176939725875854; dx=-2.6062767184663224E-9 evalInputDelta=0.05730433762073517
Fitness changed from -0.2844650596380234 to -0.3790822774171829
Iteration 10 complete. Error: -0.3790822774171829 Total: 58.6251; Orientation: 0.9962; Line Search: 47.4303
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -0.3790822774171829 (> -Infinity) after 444.086s (< 3600.000s)
-0.3790822774171829