Code from BasicOptimizer.scala:75 executed in 3506.34 seconds (41.317 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: 825884164916500
Reset training subject: 825924752520600
Adding measurement 1ab14636 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.893748253583908;dx=-1.5880257328917775E-7
New Minimum: 4.893748253583908 > 4.893748044967651
WOLFE (weak): th(2.154434690031884)=4.893748044967651; dx=-1.588026486325161E-7 evalInputDelta=2.086162567138672E-7
New Minimum: 4.893748044967651 > 4.893747866153717
WOLFE (weak): th(4.308869380063768)=4.893747866153717; dx=-1.588026696338995E-7 evalInputDelta=3.8743019104003906E-7
New Minimum: 4.893747866153717 > 4.8937466740608215
WOLFE (weak): th(12.926608140191302)=4.8937466740608215; dx=-1.588026316095824E-7 evalInputDelta=1.5795230865478516E-6
New Minimum: 4.8937466740608215 > 4.893742114305496
WOLFE (weak): th(51.70643256076521)=4.893742114305496; dx=-1.5880301328970024E-7 evalInputDelta=6.139278411865234E-6
New Minimum: 4.893742114305496 > 4.89371657371521
WOLFE (weak): th(258.53216280382605)=4.89371657371521; dx=-1.5880251165686428E-7 evalInputDelta=3.167986869812012E-5
New Minimum: 4.89371657371521 > 4.893557906150818
WOLFE (weak): th(1551.1929768229563)=4.893557906150818; dx=-1.5880202095986426E-7 evalInputDelta=1.9034743309020996E-4
New Minimum: 4.893557906150818 > 4.892415255308151
WOLFE (weak): th(10858.350837760694)=4.892415255308151; dx=-1.587819525642864E-7 evalInputDelta=0.001332998275756836
New Minimum: 4.892415255308151 > 4.883074998855591
WOLFE (weak): th(86866.80670208555)=4.883074998855591; dx=-1.585815644365194E-7 evalInputDelta=0.01067325472831726
New Minimum: 4.883074998855591 > 4.7971696853637695
WOLFE (weak): th(781801.26031877)=4.7971696853637695; dx=-1.5644456097232703E-7 evalInputDelta=0.09657856822013855
New Minimum: 4.7971696853637695 > 3.9764613211154938
END: th(7818012.6031877)=3.9764613211154938; dx=-1.1582285859351788E-7 evalInputDelta=0.9172869324684143
Fitness changed from 4.893748253583908 to 3.9764613211154938
Iteration 1 complete. Error:
...skipping 15248 bytes...
ine Search: 81.6842
Adding measurement 6aae0e6f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.621e+04, gradient 1.021e-04, dot -0.916; [5fbe0d30-dcb0-42be-b846-47a1db892e48 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.5299557000398636, 1.524758130311966, 1.4826145395636559, 1.4508227333426476
LBFGS Accumulation History: 3 points
Removed measurement 3b4ef59f to history. Total: 4
th(0)=1.4508227333426476;dx=-1.042747589435331E-8
Armijo: th(9.4256517688895E7)=1.5777739956974983; dx=-6.87515472538428E-9 evalInputDelta=-0.12695126235485077
New Minimum: 1.4508227333426476 > 1.4249621778726578
END: th(4.71282588444475E7)=1.4249621778726578; dx=-8.29416437998322E-9 evalInputDelta=0.025860555469989777
Fitness changed from 1.4508227333426476 to 1.4249621778726578
Iteration 19 complete. Error: 1.4249621778726578 Total: 159.3787; Orientation: 2.6999; Line Search: 116.7651
Adding measurement 527937d0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.462e+04, gradient 9.993e-05, dot -0.907; [5fbe0d30-dcb0-42be-b846-47a1db892e48 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.524758130311966, 1.4826145395636559, 1.4508227333426476, 1.4249621778726578
LBFGS Accumulation History: 3 points
Removed measurement 5f8f1712 to history. Total: 4
th(0)=1.4249621778726578;dx=-9.98609728397906E-9
Armijo: th(1.0153475573527963E8)=1.5782701820135117; dx=-6.371888012742365E-9 evalInputDelta=-0.15330800414085388
New Minimum: 1.4249621778726578 > 1.4036341607570648
END: th(5.076737786763982E7)=1.4036341607570648; dx=-7.792624956779405E-9 evalInputDelta=0.021328017115592957
Fitness changed from 1.4249621778726578 to 1.4036341607570648
Iteration 20 complete. Error: 1.4036341607570648 Total: 160.8000; Orientation: 2.7217; Line Search: 119.9969
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/c0271b4f-c3a9-45d1-ad84-ca5491c57054.jpg)
Final threshold in iteration 21: 1.4036341607570648 (> -Infinity) after 3506.338s (< 3600.000s)
1.4036341607570648