Code from BasicOptimizer.scala:75 executed in 574.05 seconds (6.990 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: 1376862966451900
Reset training subject: 1376870119010400
Adding measurement 113eed88 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.768622875213623;dx=-3.4854658074787596E-6
New Minimum: 4.768622875213623 > 4.76861909031868
WOLFE (weak): th(2.154434690031884)=4.76861909031868; dx=-3.4743783322554735E-6 evalInputDelta=3.7848949432373047E-6
New Minimum: 4.76861909031868 > 4.768615648150444
WOLFE (weak): th(4.308869380063768)=4.768615648150444; dx=-3.474361230118621E-6 evalInputDelta=7.227063179016113E-6
New Minimum: 4.768615648150444 > 4.768600821495056
WOLFE (weak): th(12.926608140191302)=4.768600821495056; dx=-3.4744038076090032E-6 evalInputDelta=2.205371856689453E-5
New Minimum: 4.768600821495056 > 4.7685331255197525
WOLFE (weak): th(51.70643256076521)=4.7685331255197525; dx=-3.4743474751191617E-6 evalInputDelta=8.974969387054443E-5
New Minimum: 4.7685331255197525 > 4.768172457814217
WOLFE (weak): th(258.53216280382605)=4.768172457814217; dx=-3.4736586300027088E-6 evalInputDelta=4.504173994064331E-4
New Minimum: 4.768172457814217 > 4.765919506549835
WOLFE (weak): th(1551.1929768229563)=4.765919506549835; dx=-3.469559405000011E-6 evalInputDelta=0.002703368663787842
New Minimum: 4.765919506549835 > 4.749770566821098
WOLFE (weak): th(10858.350837760694)=4.749770566821098; dx=-3.446595403262159E-6 evalInputDelta=0.01885230839252472
New Minimum: 4.749770566821098 > 4.624296858906746
WOLFE (weak): th(86866.80670208555)=4.624296858906746; dx=-3.2290558983567042E-6 evalInputDelta=0.14432601630687714
New Minimum: 4.624296858906746 > 3.9646147042512894
END: th(781801.26031877)=3.9646147042512894; dx=-1.7449374744501353E-6 evalInputDelta=0.8040081709623337
Fitness changed from 4.768622875213623 to 3.9646147042512894
Iteration 1 complete. Error: 3.9646147042512894 Total: 84.6118; Orientation: 0.0126; Line Search: 64.8019
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cf79c4f7-23c0-4875-970b-a5a
...skipping 15201 bytes...
16; Line Search: 19.3660
Adding measurement 6463da36 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.484e+03, gradient 5.102e-04, dot -0.606; [99eee194-a2a0-42fe-998a-9fd069ad10d5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.9394441097974777, 0.8186215162277222, 0.7467750757932663, 0.7146731317043304
LBFGS Accumulation History: 3 points
Removed measurement 3f322610 to history. Total: 4
th(0)=0.7146731317043304;dx=-2.603105757068526E-7
Armijo: th(5301929.120000343)=1.3301940262317657; dx=1.3127672203539628E-7 evalInputDelta=-0.6155208945274353
Armijo: th(2650964.5600001714)=0.7613609135150909; dx=4.5846671434169784E-8 evalInputDelta=-0.0466877818107605
New Minimum: 0.7146731317043304 > 0.6329083293676376
END: th(883654.8533333904)=0.6329083293676376; dx=-1.1678488467349673E-7 evalInputDelta=0.08176480233669281
Fitness changed from 0.7146731317043304 to 0.6329083293676376
Iteration 19 complete. Error: 0.6329083293676376 Total: 32.5953; Orientation: 0.3481; Line Search: 25.8628
Adding measurement 7417ef4f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.964e+03, gradient 3.691e-04, dot -0.802; [99eee194-a2a0-42fe-998a-9fd069ad10d5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.8186215162277222, 0.7467750757932663, 0.7146731317043304, 0.6329083293676376
LBFGS Accumulation History: 3 points
Removed measurement 1846ad0f to history. Total: 4
th(0)=0.6329083293676376;dx=-1.3620216143783606E-7
New Minimum: 0.6329083293676376 > 0.5822992771863937
END: th(1903776.6700364929)=0.5822992771863937; dx=-9.341959674120648E-8 evalInputDelta=0.050609052181243896
Fitness changed from 0.6329083293676376 to 0.5822992771863937
Iteration 20 complete. Error: 0.5822992771863937 Total: 19.5676; Orientation: 0.3563; Line Search: 12.9293
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/4571e8af-1502-450b-846e-a00d41bdc253.jpg)
Final threshold in iteration 21: 0.5822992771863937 (> -Infinity) after 574.038s (< 3600.000s)
0.5822992771863937