Code from BasicOptimizer.scala:75 executed in 801.51 seconds (2.438 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: 830473566336600
Reset training subject: 830483892724500
Adding measurement 2b1a901d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.3347680419683456;dx=-5.2461046204002E-9
New Minimum: -1.3347680419683456 > -1.334768071770668
WOLFE (weak): th(2.154434690031884)=-1.334768071770668; dx=-5.246105892991151E-9 evalInputDelta=2.9802322387695312E-8
WOLFE (weak): th(4.308869380063768)=-1.334768071770668; dx=-5.24610608997638E-9 evalInputDelta=2.9802322387695312E-8
New Minimum: -1.334768071770668 > -1.3347680866718292
WOLFE (weak): th(12.926608140191302)=-1.3347680866718292; dx=-5.246108952745331E-9 evalInputDelta=4.470348358154297E-8
New Minimum: -1.3347680866718292 > -1.3347682282328606
WOLFE (weak): th(51.70643256076521)=-1.3347682282328606; dx=-5.246107111184797E-9 evalInputDelta=1.862645149230957E-7
New Minimum: -1.3347682282328606 > -1.3347690626978874
WOLFE (weak): th(258.53216280382605)=-1.3347690626978874; dx=-5.246109761860871E-9 evalInputDelta=1.0207295417785645E-6
New Minimum: -1.3347690626978874 > -1.3347740545868874
WOLFE (weak): th(1551.1929768229563)=-1.3347740545868874; dx=-5.246177482400942E-9 evalInputDelta=6.012618541717529E-6
New Minimum: -1.3347740545868874 > -1.3348099887371063
WOLFE (weak): th(10858.350837760694)=-1.3348099887371063; dx=-5.246613231150321E-9 evalInputDelta=4.194676876068115E-5
New Minimum: -1.3348099887371063 > -1.3351039737462997
WOLFE (weak): th(86866.80670208555)=-1.3351039737462997; dx=-5.248899539432767E-9 evalInputDelta=3.3593177795410156E-4
New Minimum: -1.3351039737462997 > -1.3378021866083145
WOLFE (weak): th(781801.26031877)=-1.3378021866083145; dx=-5.260528223137109E-9 evalInputDelta=0.003034144639968872
New Minimum: -1.3378021866083145 > -1.3660412728786469
WOLFE (weak): th(7818012.6031877)=-1.3660412728786469; dx=-5.322202450747262E-9 evalInputDelta=0.03127323091030121
New Minimum: -1.3660412728786469 > -1.7290686070919037
WOLFE (weak): th(8.59981386350646
...skipping 13538 bytes...
8942108
END: th(1.0E9)=-5.384220778942108; dx=-3.602296134043113E-11 evalInputDelta=0.017613708972930908
Fitness changed from -5.366607069969177 to -5.384220778942108
Iteration 18 complete. Error: -5.384220778942108 Total: 33.6607; Orientation: 2.7965; Line Search: 20.7836
Adding measurement 11adab6d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.868e+05, gradient 1.405e-05, dot -0.488; [87f41e8e-b366-4010-ab53-b5edbbb5200d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.325813293457031, -5.347349047660828, -5.366607069969177, -5.384220778942108
LBFGS Accumulation History: 3 points
Removed measurement 26270b77 to history. Total: 4
th(0)=-5.384220778942108;dx=-1.973388405608758E-10
New Minimum: -5.384220778942108 > -5.40026319026947
END: th(1.0E9)=-5.40026319026947; dx=-3.372189953307039E-11 evalInputDelta=0.01604241132736206
Fitness changed from -5.384220778942108 to -5.40026319026947
Iteration 19 complete. Error: -5.40026319026947 Total: 33.5933; Orientation: 2.7978; Line Search: 20.6655
Adding measurement aedc426 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.796e+05, gradient 1.382e-05, dot -0.481; [87f41e8e-b366-4010-ab53-b5edbbb5200d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.347349047660828, -5.366607069969177, -5.384220778942108, -5.40026319026947
LBFGS Accumulation History: 3 points
Removed measurement 5315266 to history. Total: 4
th(0)=-5.40026319026947;dx=-1.9097317927056405E-10
New Minimum: -5.40026319026947 > -5.4151864647865295
END: th(1.0E9)=-5.4151864647865295; dx=-3.1951074868074E-11 evalInputDelta=0.014923274517059326
Fitness changed from -5.40026319026947 to -5.4151864647865295
Iteration 20 complete. Error: -5.4151864647865295 Total: 33.5483; Orientation: 2.7815; Line Search: 20.6605
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/e5d5aa68-ea0a-4561-9c37-14b81019f0fb.jpg)
Final threshold in iteration 21: -5.4151864647865295 (> -Infinity) after 801.507s (< 3600.000s)
-5.4151864647865295