Code from BasicOptimizer.scala:75 executed in 351.62 seconds (4.541 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: 2634402386542
Reset training subject: 2635545772999
Adding measurement 26dad85b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.7513036218900655;dx=-8.319627919027811E-8
New Minimum: 0.7513036218900655 > 0.7513034859678307
WOLFE (weak): th(2.154434690031884)=0.7513034859678307; dx=-8.319689088550312E-8 evalInputDelta=1.3592223480074495E-7
New Minimum: 0.7513034859678307 > 0.751303350045087
WOLFE (weak): th(4.308869380063768)=0.751303350045087; dx=-8.319608787109138E-8 evalInputDelta=2.718449785277244E-7
New Minimum: 0.751303350045087 > 0.7513028063519102
WOLFE (weak): th(12.926608140191302)=0.7513028063519102; dx=-8.319630090170574E-8 evalInputDelta=8.155381553409669E-7
New Minimum: 0.7513028063519102 > 0.7513003596943459
WOLFE (weak): th(51.70643256076521)=0.7513003596943459; dx=-8.31981742385742E-8 evalInputDelta=3.2621957195555495E-6
New Minimum: 0.7513003596943459 > 0.751287309851805
WOLFE (weak): th(258.53216280382605)=0.751287309851805; dx=-8.32018054091272E-8 evalInputDelta=1.6312038260468675E-5
New Minimum: 0.751287309851805 > 0.7512057185739539
WOLFE (weak): th(1551.1929768229563)=0.7512057185739539; dx=-8.321261169800141E-8 evalInputDelta=9.790331611159164E-5
New Minimum: 0.7512057185739539 > 0.7506170049373977
WOLFE (weak): th(10858.350837760694)=0.7506170049373977; dx=-8.324790939703282E-8 evalInputDelta=6.866169526678068E-4
New Minimum: 0.7506170049373977 > 0.7457583569360238
WOLFE (weak): th(86866.80670208555)=0.7457583569360238; dx=-8.256680167885226E-8 evalInputDelta=0.005545264954041729
New Minimum: 0.7457583569360238 > 0.7054324539960466
END: th(781801.26031877)=0.7054324539960466; dx=-5.5950223515414555E-8 evalInputDelta=0.045871167894018905
Fitness changed from 0.7513036218900655 to 0.7054324539960466
Iteration 1 complete. Error: 0.7054324539960466 Total: 17.1316; Orientation: 0.0685; Line Search: 13.4950
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/072d8330-8229-43b7-83ed-09d409222fb9.jpg
...skipping 42966 bytes...
190; Line Search: 4.1294
Adding measurement 2a0f7a19 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.671e+02, gradient 2.682e-05, dot -0.527; [b506fe24-460a-4515-b379-1d687244dcc1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.16591578511028218, 0.1649817075512373, 0.16430794143471408, 0.1640576623625724
LBFGS Accumulation History: 3 points
Removed measurement d77d709 to history. Total: 4
th(0)=0.1640576623625724;dx=-7.191011145236554E-10
Armijo: th(2.7401316894921713E7)=0.1712043738718328; dx=3.501380846473237E-10 evalInputDelta=-0.007146711509260384
Armijo: th(1.3700658447460856E7)=0.16414447128801052; dx=1.3136785572631854E-10 evalInputDelta=-8.680892543810881E-5
New Minimum: 0.1640576623625724 > 0.16260116943175182
END: th(4566886.149153619)=0.16260116943175182; dx=-2.8661354974923813E-10 evalInputDelta=0.001456492930820591
Fitness changed from 0.1640576623625724 to 0.16260116943175182
Iteration 49 complete. Error: 0.16260116943175182 Total: 8.3096; Orientation: 1.6095; Line Search: 5.5004
Adding measurement 2345036f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.410e+02, gradient 1.835e-05, dot -0.784; [b506fe24-460a-4515-b379-1d687244dcc1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.1649817075512373, 0.16430794143471408, 0.1640576623625724, 0.16260116943175182
LBFGS Accumulation History: 3 points
Removed measurement 1b04a3c5 to history. Total: 4
th(0)=0.16260116943175182;dx=-3.367414652405156E-10
New Minimum: 0.16260116943175182 > 0.16176505495331966
END: th(9839057.94516268)=0.16176505495331966; dx=-1.8502009219720177E-10 evalInputDelta=8.361144784321539E-4
Fitness changed from 0.16260116943175182 to 0.16176505495331966
Iteration 50 complete. Error: 0.16176505495331966 Total: 5.5666; Orientation: 1.6255; Line Search: 2.7347
<a id="p-29"></a>Iteration 50
<a id="p-28"></a>![Iteration 50](etc/608abeb2-8a57-437f-845d-102a12feef1d.jpg)
Final threshold in iteration 51: 0.16176505495331966 (> -Infinity) after 351.623s (< 3600.000s)
0.16176505495331966