Code from BasicOptimizer.scala:75 executed in 23.78 seconds (0.231 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: 927217623280900
Reset training subject: 927218581992700
Adding measurement ca3a774 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.4421781189739704;dx=-2.69931488691905E-5
New Minimum: 3.4421781189739704 > 3.4421315230429173
WOLFE (weak): th(2.154434690031884)=3.4421315230429173; dx=-2.6982982258015302E-5 evalInputDelta=4.659593105316162E-5
New Minimum: 3.4421315230429173 > 3.442084450274706
WOLFE (weak): th(4.308869380063768)=3.442084450274706; dx=-2.698467204166784E-5 evalInputDelta=9.366869926452637E-5
New Minimum: 3.442084450274706 > 3.4418973438441753
WOLFE (weak): th(12.926608140191302)=3.4418973438441753; dx=-2.698051257295712E-5 evalInputDelta=2.8077512979507446E-4
New Minimum: 3.4418973438441753 > 3.4410547502338886
WOLFE (weak): th(51.70643256076521)=3.4410547502338886; dx=-2.6943387243063102E-5 evalInputDelta=0.0011233687400817871
New Minimum: 3.4410547502338886 > 3.437826532870531
WOLFE (weak): th(258.53216280382605)=3.437826532870531; dx=-2.5073851617459104E-5 evalInputDelta=0.004351586103439331
New Minimum: 3.437826532870531 > 3.409579172730446
END: th(1551.1929768229563)=3.409579172730446; dx=-2.154231455728841E-5 evalInputDelta=0.03259894624352455
Fitness changed from 3.4421781189739704 to 3.409579172730446
Iteration 1 complete. Error: 3.409579172730446 Total: 9.5031; Orientation: 0.0049; Line Search: 6.8362
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ae4a4f95-d684-427b-9b19-f9213c1340ce.jpg)
Adding measurement 6db34ffb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=3.409579172730446;dx=-2.032932341280207E-5
New Minimum: 3.409579172730446 > 3.3579141907393932
END: th(3341.943960201201)=3.3579141907393932; dx=-1.8122776622362174E-5 evalInputDelta=0.05166498199105263
Fitness changed from 3.409579172730446 to 3.3579141907393932
Iteration 2 complete. Error: 3.3579141907393932 Total: 2.8033; Orientation: 0.0039; Line Search: 1.8753
<a id="p-5"></a>Iter
...skipping 1274 bytes...
6855
Fitness changed from 3.272282712161541 to 3.1724811382591724
Iteration 4 complete. Error: 3.1724811382591724 Total: 2.8176; Orientation: 0.1207; Line Search: 1.7492
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ca04596a-d2d6-4e18-94eb-29ef5b88ad2f.jpg)
Adding measurement 6c59e956 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.625e+02, gradient 3.157e-03, dot -0.860; [3c5867f4-53ab-4900-9c39-b56142093e01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.409579172730446, 3.3579141907393932, 3.272282712161541, 3.1724811382591724
LBFGS Accumulation History: 3 points
Removed measurement 6db34ffb to history. Total: 4
th(0)=3.1724811382591724;dx=-9.964161944074744E-6
New Minimum: 3.1724811382591724 > 3.041366867721081
END: th(33419.43960201202)=3.041366867721081; dx=-3.818588277418146E-6 evalInputDelta=0.13111427053809166
Fitness changed from 3.1724811382591724 to 3.041366867721081
Iteration 5 complete. Error: 3.041366867721081 Total: 2.7945; Orientation: 0.1116; Line Search: 1.7443
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5ca4fdfb-6b86-4b1e-b9e6-46376b3057c8.jpg)
Adding measurement 124b5912 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.943e+02, gradient 2.898e-03, dot -0.761; [3c5867f4-53ab-4900-9c39-b56142093e01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.3579141907393932, 3.272282712161541, 3.1724811382591724, 3.041366867721081
LBFGS Accumulation History: 3 points
Removed measurement 213821dd to history. Total: 4
th(0)=3.041366867721081;dx=-8.39708308822012E-6
New Minimum: 3.041366867721081 > 2.946162059903145
END: th(72000.00000000003)=2.946162059903145; dx=-1.3458874862087649E-6 evalInputDelta=0.09520480781793594
Fitness changed from 3.041366867721081 to 2.946162059903145
Iteration 6 complete. Error: 2.946162059903145 Total: 2.8935; Orientation: 0.1117; Line Search: 1.8490
Final threshold in iteration 7: 2.946162059903145 (> -Infinity) after 23.779s (< 720.000s)
2.946162059903145