Code from BasicOptimizer.scala:75 executed in 2457.12 seconds (25.972 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: 1078254147651900
Reset training subject: 1078275159378100
Adding measurement 56da2437 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.2015366093991706;dx=-2.9434481747739304E-7
New Minimum: 2.2015366093991706 > 2.201536028263992
WOLFE (weak): th(2.154434690031884)=2.201536028263992; dx=-2.917178416600094E-7 evalInputDelta=5.811351786455532E-7
New Minimum: 2.201536028263992 > 2.201535402415222
WOLFE (weak): th(4.308869380063768)=2.201535402415222; dx=-2.9171770714408694E-7 evalInputDelta=1.2069839487871548E-6
New Minimum: 2.201535402415222 > 2.2015329139415183
WOLFE (weak): th(12.926608140191302)=2.2015329139415183; dx=-2.9171725989617354E-7 evalInputDelta=3.6954576523307026E-6
New Minimum: 2.2015329139415183 > 2.2015211570264155
WOLFE (weak): th(51.70643256076521)=2.2015211570264155; dx=-2.9171537401244945E-7 evalInputDelta=1.545237275513145E-5
New Minimum: 2.2015211570264155 > 2.201457887251921
WOLFE (weak): th(258.53216280382605)=2.201457887251921; dx=-2.9170499922609345E-7 evalInputDelta=7.872214724979898E-5
New Minimum: 2.201457887251921 > 2.2010662582892464
WOLFE (weak): th(1551.1929768229563)=2.2010662582892464; dx=-2.916362372792773E-7 evalInputDelta=4.7035110992421636E-4
New Minimum: 2.2010662582892464 > 2.1982475937069648
WOLFE (weak): th(10858.350837760694)=2.1982475937069648; dx=-2.9119441974708877E-7 evalInputDelta=0.0032890156922058544
New Minimum: 2.1982475937069648 > 2.175386875574021
WOLFE (weak): th(86866.80670208555)=2.175386875574021; dx=-2.8752724580638256E-7 evalInputDelta=0.026149733825149735
New Minimum: 2.175386875574021 > 1.9812521216847223
END: th(781801.26031877)=1.9812521216847223; dx=-2.4989996199301145E-7 evalInputDelta=0.2202844877144483
Fitness changed from 2.2015366093991706 to 1.9812521216847223
Iteration 1 complete. Error: 1.9812521216847223 Total: 255.3566; Orientation: 0.0492; Line Search: 194.7710
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cb17
...skipping 25039 bytes...
history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.615e+03, gradient 7.859e-05, dot -0.681; [629e58f6-0c0f-464e-96f3-80dd17cfcec8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.14568154738579286, -0.15452754487220988, -0.17014091230323958, -0.18006116029678032
LBFGS Accumulation History: 3 points
Removed measurement 202d83b9 to history. Total: 4
th(0)=-0.18006116029678032;dx=-6.177048878275129E-9
Armijo: th(1.5668943786308583E7)=-0.1696242125031402; dx=3.44061268398784E-12 evalInputDelta=-0.010436947793640128
New Minimum: -0.18006116029678032 > -0.18682125221507362
END: th(7834471.893154291)=-0.18682125221507362; dx=-1.0573383915373735E-9 evalInputDelta=0.006760091918293298
Fitness changed from -0.18006116029678032 to -0.18682125221507362
Iteration 29 complete. Error: -0.18682125221507362 Total: 78.3752; Orientation: 1.0436; Line Search: 57.7793
Adding measurement 20616795 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.246e+03, gradient 8.354e-05, dot -0.632; [629e58f6-0c0f-464e-96f3-80dd17cfcec8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.15452754487220988, -0.17014091230323958, -0.18006116029678032, -0.18682125221507362
LBFGS Accumulation History: 3 points
Removed measurement 316a682b to history. Total: 4
th(0)=-0.18682125221507362;dx=-6.979570729726184E-9
Armijo: th(1.6878858024691373E7)=-0.167617195551522; dx=8.519796684456754E-10 evalInputDelta=-0.019204056663551627
New Minimum: -0.18682125221507362 > -0.19394646727868436
END: th(8439429.012345687)=-0.19394646727868436; dx=-4.141336664981777E-10 evalInputDelta=0.007125215063610746
Fitness changed from -0.18682125221507362 to -0.19394646727868436
Iteration 30 complete. Error: -0.19394646727868436 Total: 80.3492; Orientation: 1.0834; Line Search: 59.5234
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/af65a4b4-1052-495a-9a72-0895a0a2f35b.jpg)
Final threshold in iteration 31: -0.19394646727868436 (> -Infinity) after 2457.111s (< 3600.000s)
-0.19394646727868436