Code from BasicOptimizer.scala:75 executed in 3895.54 seconds (43.597 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: 1384413494837800
Reset training subject: 1384468786777800
Adding measurement 515fff35 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=6.096707049757242;dx=-6.752003233809979E-6
New Minimum: 6.096707049757242 > 6.0966989398002625
WOLFE (weak): th(2.154434690031884)=6.0966989398002625; dx=-6.719658903177863E-6 evalInputDelta=8.109956979751587E-6
New Minimum: 6.0966989398002625 > 6.096691194921732
WOLFE (weak): th(4.308869380063768)=6.096691194921732; dx=-6.719586978974805E-6 evalInputDelta=1.5854835510253906E-5
New Minimum: 6.096691194921732 > 6.096660405397415
WOLFE (weak): th(12.926608140191302)=6.096660405397415; dx=-6.719369996354386E-6 evalInputDelta=4.6644359827041626E-5
New Minimum: 6.096660405397415 > 6.096520282328129
WOLFE (weak): th(51.70643256076521)=6.096520282328129; dx=-6.718188284665187E-6 evalInputDelta=1.8676742911338806E-4
New Minimum: 6.096520282328129 > 6.095773741602898
WOLFE (weak): th(258.53216280382605)=6.095773741602898; dx=-6.716652503936111E-6 evalInputDelta=9.333081543445587E-4
New Minimum: 6.095773741602898 > 6.091117262840271
WOLFE (weak): th(1551.1929768229563)=6.091117262840271; dx=-6.690572003726155E-6 evalInputDelta=0.005589786916971207
New Minimum: 6.091117262840271 > 6.05807001888752
WOLFE (weak): th(10858.350837760694)=6.05807001888752; dx=-6.5031051396343546E-6 evalInputDelta=0.038637030869722366
New Minimum: 6.05807001888752 > 5.825616173446178
END: th(86866.80670208555)=5.825616173446178; dx=-4.893878099444137E-6 evalInputDelta=0.27109087631106377
Fitness changed from 6.096707049757242 to 5.825616173446178
Iteration 1 complete. Error: 5.825616173446178 Total: 567.5241; Orientation: 0.0812; Line Search: 419.5606
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/740571d7-57d0-4bb7-a711-28cc71375942.jpg)
Adding measurement 4b1b2255 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=5.825616173446178;dx=-4.332803884488959E-6
New Minimum: 5.
...skipping 14938 bytes...
534 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.598e+03, gradient 4.277e-04, dot -0.731; [eaacc438-f5ef-496b-8213-4d011221f200 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.9893104285001755, 1.9156893268227577, 1.8317212238907814, 1.76310196518898
LBFGS Accumulation History: 3 points
Removed measurement 8d23cd8 to history. Total: 4
th(0)=1.76310196518898;dx=-1.8292874343107654E-7
New Minimum: 1.76310196518898 > 1.6972579658031464
END: th(1396392.8546502963)=1.6972579658031464; dx=-3.300959127659334E-8 evalInputDelta=0.06584399938583374
Fitness changed from 1.76310196518898 to 1.6972579658031464
Iteration 19 complete. Error: 1.6972579658031464 Total: 140.5054; Orientation: 2.3610; Line Search: 92.3871
Adding measurement 112a50a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.817e+03, gradient 5.748e-04, dot -0.559; [eaacc438-f5ef-496b-8213-4d011221f200 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.9156893268227577, 1.8317212238907814, 1.76310196518898, 1.6972579658031464
LBFGS Accumulation History: 3 points
Removed measurement 52ab003b to history. Total: 4
th(0)=1.6972579658031464;dx=-3.303575822662952E-7
Armijo: th(3008437.2069712486)=1.8289607614278793; dx=1.8116783923011796E-7 evalInputDelta=-0.13170279562473297
New Minimum: 1.6972579658031464 > 1.6798963248729706
WOLF (strong): th(1504218.6034856243)=1.6798963248729706; dx=1.2143505056344727E-7 evalInputDelta=0.01736164093017578
New Minimum: 1.6798963248729706 > 1.650613147765398
END: th(501406.20116187475)=1.650613147765398; dx=-7.379178564476401E-8 evalInputDelta=0.04664481803774834
Fitness changed from 1.6972579658031464 to 1.650613147765398
Iteration 20 complete. Error: 1.650613147765398 Total: 235.6687; Orientation: 2.3648; Line Search: 186.7924
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/2388871e-3102-4e2d-a331-6d883cfcc151.jpg)
Final threshold in iteration 21: 1.650613147765398 (> -Infinity) after 3895.544s (< 5400.000s)
1.650613147765398