Code from BasicOptimizer.scala:75 executed in 65.73 seconds (1.550 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: 930332923952400
Reset training subject: 930333916014700
Adding measurement a90273e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.5839123202022165;dx=-4.401062125011294E-5
New Minimum: 3.5839123202022165 > 3.5838398579508066
WOLFE (weak): th(2.154434690031884)=3.5838398579508066; dx=-4.403754812410013E-5 evalInputDelta=7.246225140988827E-5
New Minimum: 3.5838398579508066 > 3.5837673973292112
WOLFE (weak): th(4.308869380063768)=3.5837673973292112; dx=-4.4011674495626746E-5 evalInputDelta=1.4492287300527096E-4
New Minimum: 3.5837673973292112 > 3.583477073116228
WOLFE (weak): th(12.926608140191302)=3.583477073116228; dx=-4.39790243655402E-5 evalInputDelta=4.352470859885216E-4
New Minimum: 3.583477073116228 > 3.5821792078204453
WOLFE (weak): th(51.70643256076521)=3.5821792078204453; dx=-4.365628038050948E-5 evalInputDelta=0.0017331123817712069
Armijo: th(258.53216280382605)=3.5911575998179615; dx=-4.1678552845957296E-5 evalInputDelta=-0.007245279615744948
New Minimum: 3.5821792078204453 > 3.578715092036873
WOLFE (weak): th(155.11929768229564)=3.578715092036873; dx=-4.150108126700636E-5 evalInputDelta=0.005197228165343404
WOLFE (weak): th(206.82573024306083)=3.582475855248049; dx=-4.7482339736286275E-4 evalInputDelta=0.0014364649541676044
Armijo: th(232.67894652344344)=3.5919873104430735; dx=-4.152929142270369E-5 evalInputDelta=-0.008074990240857005
Armijo: th(219.75233838325215)=3.5898235489148647; dx=-7.423098749794848E-4 evalInputDelta=-0.005911228712648153
Armijo: th(213.2890343131565)=3.5856847842223942; dx=-5.997185870281036E-4 evalInputDelta=-0.001772464020177722
Armijo: th(210.05738227810866)=3.5840761461295187; dx=-5.399285518481982E-4 evalInputDelta=-1.6382592730224133E-4
WOLFE (weak): th(208.44155626058475)=3.583258834667504; dx=-5.075245371834706E-4 evalInputDelta=6.534855347126722E-4
WOLFE (weak): th(209.24946926934672)=3.58368370286189; dx=-5.245929442706798E-4 evalInputDelta=2.286173403263092E
...skipping 6223 bytes...
/a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b3fd1d02-ff37-4522-af9e-cab73ad01522.jpg)
Adding measurement 7ff5f932 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.221e+02, gradient 5.188e-03, dot -0.383; [0e72b756-893f-49b6-96c1-0f3966bb1e2c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.578715092036873, 3.577751116361469, 3.532019129721448, 3.4918218583334237
LBFGS Accumulation History: 3 points
Removed measurement 74217f9b to history. Total: 4
th(0)=3.4918218583334237;dx=-2.6911196484021253E-5
New Minimum: 3.4918218583334237 > 3.4454587458167225
WOLFE (weak): th(2542.2145100963526)=3.4454587458167225; dx=-2.337966179255681E-5 evalInputDelta=0.04636311251670122
New Minimum: 3.4454587458167225 > 3.3864995799958706
END: th(5084.429020192705)=3.3864995799958706; dx=-1.6770205852868704E-5 evalInputDelta=0.10532227833755314
Fitness changed from 3.4918218583334237 to 3.3864995799958706
Iteration 5 complete. Error: 3.3864995799958706 Total: 3.8072; Orientation: 0.1109; Line Search: 2.7083
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/51a9e35f-527f-42e7-bff6-b856aff82c7b.jpg)
Adding measurement 273e7174 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.709e+01, gradient 4.336e-03, dot -0.925; [0e72b756-893f-49b6-96c1-0f3966bb1e2c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.577751116361469, 3.532019129721448, 3.4918218583334237, 3.3864995799958706
LBFGS Accumulation History: 3 points
Removed measurement 2bb41e9b to history. Total: 4
th(0)=3.3864995799958706;dx=-1.8797086501154218E-5
New Minimum: 3.3864995799958706 > 3.2881961963139474
END: th(10954.070260107985)=3.2881961963139474; dx=-7.85789503822479E-6 evalInputDelta=0.09830338368192315
Fitness changed from 3.3864995799958706 to 3.2881961963139474
Iteration 6 complete. Error: 3.2881961963139474 Total: 3.0607; Orientation: 0.1218; Line Search: 1.9538
Final threshold in iteration 7: 3.2881961963139474 (> -Infinity) after 65.734s (< 720.000s)
3.2881961963139474