Code from BasicOptimizer.scala:75 executed in 285.47 seconds (6.449 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: 1470378222141
Reset training subject: 1471399084552
Adding measurement 157fedad to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.7145976437640605;dx=-5.925201087948623E-9
New Minimum: 0.7145976437640605 > 0.7145976337895191
WOLFE (weak): th(2.154434690031884)=0.7145976337895191; dx=-5.925200907797599E-9 evalInputDelta=9.97454141504761E-9
New Minimum: 0.7145976337895191 > 0.714597623814984
WOLFE (weak): th(4.308869380063768)=0.714597623814984; dx=-5.925198621692225E-9 evalInputDelta=1.994907650182398E-8
New Minimum: 0.714597623814984 > 0.7145975839168315
WOLFE (weak): th(12.926608140191302)=0.7145975839168315; dx=-5.9252030694463564E-9 evalInputDelta=5.984722906138273E-8
New Minimum: 0.7145975839168315 > 0.7145974043745197
WOLFE (weak): th(51.70643256076521)=0.7145974043745197; dx=-5.925194419978676E-9 evalInputDelta=2.393895408570046E-7
New Minimum: 0.7145974043745197 > 0.7145964468181859
WOLFE (weak): th(258.53216280382605)=0.7145964468181859; dx=-5.925243292282372E-9 evalInputDelta=1.1969458746374784E-6
New Minimum: 0.7145964468181859 > 0.714590461776823
WOLFE (weak): th(1551.1929768229563)=0.714590461776823; dx=-5.925199524423491E-9 evalInputDelta=7.1819872375922245E-6
New Minimum: 0.714590461776823 > 0.7145473544255387
WOLFE (weak): th(10858.350837760694)=0.7145473544255387; dx=-5.926031098418473E-9 evalInputDelta=5.028933852180284E-5
New Minimum: 0.7145473544255387 > 0.714194286457663
WOLFE (weak): th(86866.80670208555)=0.714194286457663; dx=-5.936279317204228E-9 evalInputDelta=4.0335730639751155E-4
New Minimum: 0.714194286457663 > 0.7108933131235582
WOLFE (weak): th(781801.26031877)=0.7108933131235582; dx=-5.991937629344422E-9 evalInputDelta=0.0037043306405023513
New Minimum: 0.7108933131235582 > 0.6746383010004545
WOLFE (weak): th(7818012.6031877)=0.6746383010004545; dx=-5.727619562462996E-9 evalInputDelta=0.03995934276360602
New Minimum: 0.6746383010004545 > 0.4945189101570963
END: th(8.599813863506469E7)=0.494518910157
...skipping 43593 bytes...
.289453323581375 to 0.2882380908246895
Iteration 48 complete. Error: 0.2882380908246895 Total: 6.8718; Orientation: 2.0747; Line Search: 3.9595
Adding measurement 8b2d5e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.283e+03, gradient 1.358e-05, dot -0.965; [1f15f723-28fa-4bc3-9c0f-2a41dd08a190 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.2899302859992457, 0.28951075674879095, 0.289453323581375, 0.2882380908246895
LBFGS Accumulation History: 3 points
Removed measurement 4741f360 to history. Total: 4
th(0)=0.2882380908246895;dx=-1.8433435533606468E-10
New Minimum: 0.2882380908246895 > 0.2875813139572195
END: th(5.2983015089790046E7)=0.2875813139572195; dx=-1.488086117004399E-10 evalInputDelta=6.567768674700103E-4
Fitness changed from 0.2882380908246895 to 0.2875813139572195
Iteration 49 complete. Error: 0.2875813139572195 Total: 4.4131; Orientation: 1.6163; Line Search: 1.9818
Adding measurement 7e6413c8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.492e+03, gradient 1.341e-05, dot -0.902; [1f15f723-28fa-4bc3-9c0f-2a41dd08a190 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.28951075674879095, 0.289453323581375, 0.2882380908246895, 0.2875813139572195
LBFGS Accumulation History: 3 points
Removed measurement 5e9f4734 to history. Total: 4
th(0)=0.2875813139572195;dx=-1.7981469741934845E-10
Armijo: th(1.1414844569192643E8)=0.2914371890084546; dx=-1.1543568879653134E-10 evalInputDelta=-0.003855875051235136
New Minimum: 0.2875813139572195 > 0.28718062321712695
END: th(5.707422284596322E7)=0.28718062321712695; dx=-1.420850688613258E-10 evalInputDelta=4.0069074009252414E-4
Fitness changed from 0.2875813139572195 to 0.28718062321712695
Iteration 50 complete. Error: 0.28718062321712695 Total: 5.3847; Orientation: 1.6182; Line Search: 2.9477
<a id="p-29"></a>Iteration 50
<a id="p-28"></a>![Iteration 50](etc/ef20e088-48a6-4a25-90d5-f41a2edf02b8.jpg)
Final threshold in iteration 51: 0.28718062321712695 (> -Infinity) after 285.471s (< 3600.000s)
0.28718062321712695