Code from BasicOptimizer.scala:75 executed in 5518.53 seconds (65.706 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: 1434589090403500
Reset training subject: 1434656347676300
Adding measurement f4b2d13 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.294700945417084;dx=-4.913815181355031E-6
New Minimum: -49.294700945417084 > -49.294701325396694
WOLFE (weak): th(2.154434690031884)=-49.294701325396694; dx=-4.913673024391684E-6 evalInputDelta=3.7997961044311523E-7
New Minimum: -49.294701325396694 > -49.29470374683539
WOLFE (weak): th(4.308869380063768)=-49.29470374683539; dx=-4.913720566516243E-6 evalInputDelta=2.8014183044433594E-6
New Minimum: -49.29470374683539 > -49.29471369087696
WOLFE (weak): th(12.926608140191302)=-49.29471369087696; dx=-4.913841851004128E-6 evalInputDelta=1.2745459876839504E-5
New Minimum: -49.29471369087696 > -49.29475047439337
WOLFE (weak): th(51.70643256076521)=-49.29475047439337; dx=-4.914583021643593E-6 evalInputDelta=4.9528976283852444E-5
New Minimum: -49.29475047439337 > -49.29494565228621
WOLFE (weak): th(258.53216280382605)=-49.29494565228621; dx=-4.916311169130766E-6 evalInputDelta=2.447068691253662E-4
New Minimum: -49.29494565228621 > -49.29616939524809
WOLFE (weak): th(1551.1929768229563)=-49.29616939524809; dx=-4.938369901486101E-6 evalInputDelta=0.0014684498310089111
New Minimum: -49.29616939524809 > -49.30510371675094
WOLFE (weak): th(10858.350837760694)=-49.30510371675094; dx=-5.148145340091405E-6 evalInputDelta=0.01040277133385814
New Minimum: -49.30510371675094 > -49.37279939154784
END: th(86866.80670208555)=-49.37279939154784; dx=-4.110811892195713E-6 evalInputDelta=0.07809844613075256
Fitness changed from -49.294700945417084 to -49.37279939154784
Iteration 1 complete. Error: -49.37279939154784 Total: 813.6810; Orientation: 0.1253; Line Search: 610.9584
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f9012478-3ab7-48e1-8018-70b96f938711.jpg)
Adding measurement 14927cd4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-49.37279939154784;dx=-3.9
...skipping 14128 bytes...
12.4952
Adding measurement 77e4ffe5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.544e+03, gradient 8.482e-04, dot -0.631; [5cd263e4-1b33-46a5-b11d-4f643d480ac5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.27285314910114, -59.41152714192867, -59.52631576359272, -59.61889856557051
LBFGS Accumulation History: 3 points
Removed measurement 7ae97a58 to history. Total: 4
th(0)=-59.61889856557051;dx=-7.194108597307383E-7
Armijo: th(5833333.333333339)=-59.553932358821235; dx=9.101014477840196E-8 evalInputDelta=-0.06496620674927556
New Minimum: -59.61889856557051 > -59.68612261054417
END: th(2916666.6666666693)=-59.68612261054417; dx=-2.8958705985615524E-9 evalInputDelta=0.0672240449736563
Fitness changed from -59.61889856557051 to -59.68612261054417
Iteration 18 complete. Error: -59.68612261054417 Total: 280.6674; Orientation: 3.6865; Line Search: 208.3283
Adding measurement 480d3c40 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.176e+03, gradient 7.622e-04, dot -0.689; [5cd263e4-1b33-46a5-b11d-4f643d480ac5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.41152714192867, -59.52631576359272, -59.61889856557051, -59.68612261054417
LBFGS Accumulation History: 3 points
Removed measurement 2f9d47a3 to history. Total: 4
th(0)=-59.68612261054417;dx=-5.808929496287887E-7
Armijo: th(6283767.845926333)=-59.57688778887192; dx=1.9492967788789507E-7 evalInputDelta=-0.10923482167224563
New Minimum: -59.68612261054417 > -59.777940443096064
WOLF (strong): th(3141883.9229631666)=-59.777940443096064; dx=5.9298913654183585E-8 evalInputDelta=0.09181783255189657
END: th(1047294.6409877222)=-59.76259217162927; dx=-2.973629384856817E-7 evalInputDelta=0.07646956108510494
Fitness changed from -59.68612261054417 to -59.777940443096064
Iteration 19 complete. Error: -59.777940443096064 Total: 342.6888; Orientation: 3.7512; Line Search: 269.2583
Final threshold in iteration 19: -59.777940443096064 (> -Infinity) after 5518.516s (< 5400.000s)
-59.777940443096064