Code from BasicOptimizer.scala:75 executed in 587.60 seconds (6.929 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: 1423274165518100
Reset training subject: 1423280630354100
Adding measurement 14b5752f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-35.60243070870638;dx=-1.2123477564850733E-5
New Minimum: -35.60243070870638 > -35.60243809968233
WOLFE (weak): th(2.154434690031884)=-35.60243809968233; dx=-1.2123596333369323E-5 evalInputDelta=7.3909759521484375E-6
New Minimum: -35.60243809968233 > -35.60245081037283
WOLFE (weak): th(4.308869380063768)=-35.60245081037283; dx=-1.2123607250997705E-5 evalInputDelta=2.0101666450500488E-5
New Minimum: -35.60245081037283 > -35.602478072047234
WOLFE (weak): th(12.926608140191302)=-35.602478072047234; dx=-1.2123683147558209E-5 evalInputDelta=4.7363340854644775E-5
New Minimum: -35.602478072047234 > -35.60261110961437
WOLFE (weak): th(51.70643256076521)=-35.60261110961437; dx=-1.2123274067235493E-5 evalInputDelta=1.8040090799331665E-4
New Minimum: -35.60261110961437 > -35.60332304984331
WOLFE (weak): th(258.53216280382605)=-35.60332304984331; dx=-1.2121712696632074E-5 evalInputDelta=8.92341136932373E-4
New Minimum: -35.60332304984331 > -35.60778243094683
WOLFE (weak): th(1551.1929768229563)=-35.60778243094683; dx=-1.211394064441475E-5 evalInputDelta=0.005351722240447998
New Minimum: -35.60778243094683 > -35.63964746147394
WOLFE (weak): th(10858.350837760694)=-35.63964746147394; dx=-1.2046938103746107E-5 evalInputDelta=0.037216752767562866
New Minimum: -35.63964746147394 > -35.88668882101774
WOLFE (weak): th(86866.80670208555)=-35.88668882101774; dx=-1.1472137848446253E-5 evalInputDelta=0.2842581123113632
New Minimum: -35.88668882101774 > -37.082655031234026
END: th(781801.26031877)=-37.082655031234026; dx=-6.910625540928869E-6 evalInputDelta=1.480224322527647
Fitness changed from -35.60243070870638 to -37.082655031234026
Iteration 1 complete. Error: -37.082655031234026 Total: 82.6702; Orientation: 0.0128; Line Search: 63.5377
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteratio
...skipping 15666 bytes...
.3446; Line Search: 31.9038
Adding measurement 95cecc5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.763e+04, gradient 1.808e-03, dot -0.962; [54996e53-36bc-48ae-a205-2cc13bc9a85c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -38.78808447252959, -38.82363305520266, -38.846719374880195, -38.92801963631064
LBFGS Accumulation History: 3 points
Removed measurement 6a1d1467 to history. Total: 4
th(0)=-38.92801963631064;dx=-3.2685212228279995E-6
Armijo: th(1178206.4711111872)=-38.72758147958666; dx=-2.3743622513900863E-6 evalInputDelta=-0.20043815672397614
New Minimum: -38.92801963631064 > -38.99169589485973
END: th(589103.2355555936)=-38.99169589485973; dx=-2.7758457957695493E-6 evalInputDelta=0.0636762585490942
Fitness changed from -38.92801963631064 to -38.99169589485973
Iteration 19 complete. Error: -38.99169589485973 Total: 25.8285; Orientation: 0.3398; Line Search: 19.2310
Adding measurement 154864f8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.459e+04, gradient 1.773e-03, dot -0.932; [54996e53-36bc-48ae-a205-2cc13bc9a85c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -38.82363305520266, -38.846719374880195, -38.92801963631064, -38.99169589485973
LBFGS Accumulation History: 3 points
Removed measurement 254e9709 to history. Total: 4
th(0)=-38.99169589485973;dx=-3.142912521831827E-6
Armijo: th(1269184.4466909952)=-38.73319644574076; dx=-2.2363068593825494E-6 evalInputDelta=-0.2584994491189718
New Minimum: -38.99169589485973 > -39.0423977682367
END: th(634592.2233454976)=-39.0423977682367; dx=-2.628008041699571E-6 evalInputDelta=0.05070187337696552
Fitness changed from -38.99169589485973 to -39.0423977682367
Iteration 20 complete. Error: -39.0423977682367 Total: 25.8092; Orientation: 0.3413; Line Search: 19.2383
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/0d8fa9aa-b0cd-4ec2-8bf8-656242d7ef40.jpg)
Final threshold in iteration 21: -39.0423977682367 (> -Infinity) after 587.595s (< 3600.000s)
-39.0423977682367