Code from BasicOptimizer.scala:75 executed in 917.40 seconds (7.400 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: 1070154826290499
Reset training subject: 1070162140191400
Adding measurement 33f349ae to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=9.97063541626843;dx=-1.0194839390097533E-5
New Minimum: 9.97063541626843 > 9.97061609307793
WOLFE (weak): th(2.154434690031884)=9.97061609307793; dx=-1.0194748994266217E-5 evalInputDelta=1.9323190498354847E-5
New Minimum: 9.97061609307793 > 9.970596864937194
WOLFE (weak): th(4.308869380063768)=9.970596864937194; dx=-1.0194710345222975E-5 evalInputDelta=3.8551331234870645E-5
New Minimum: 9.970596864937194 > 9.970519518213347
WOLFE (weak): th(12.926608140191302)=9.970519518213347; dx=-1.0194564546727835E-5 evalInputDelta=1.1589805508194218E-4
New Minimum: 9.970519518213347 > 9.970172654458674
WOLFE (weak): th(51.70643256076521)=9.970172654458674; dx=-1.0193906353342014E-5 evalInputDelta=4.627618097554631E-4
New Minimum: 9.970172654458674 > 9.9683202065105
WOLFE (weak): th(258.53216280382605)=9.9683202065105; dx=-1.018908986758784E-5 evalInputDelta=0.002315209757929537
New Minimum: 9.9683202065105 > 9.956769323535433
WOLFE (weak): th(1551.1929768229563)=9.956769323535433; dx=-1.0149124760233256E-5 evalInputDelta=0.013866092732996549
New Minimum: 9.956769323535433 > 9.87482072802866
WOLFE (weak): th(10858.350837760694)=9.87482072802866; dx=-9.905543660480032E-6 evalInputDelta=0.09581468823976991
New Minimum: 9.87482072802866 > 9.278703289270346
END: th(86866.80670208555)=9.278703289270346; dx=-7.982292084589584E-6 evalInputDelta=0.6919321269980827
Fitness changed from 9.97063541626843 to 9.278703289270346
Iteration 1 complete. Error: 9.278703289270346 Total: 88.8710; Orientation: 0.0135; Line Search: 66.2488
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/78f69e32-3192-4026-8f44-1761c0e36392.jpg)
Adding measurement 43fd77d8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=9.278703289270346;dx=-6.87654661489044E-6
New Minimum: 9.278703289270346
...skipping 23874 bytes...
863821265995896
Iteration 28 complete. Error: 0.2863821265995896 Total: 37.7540; Orientation: 0.3786; Line Search: 29.7811
Adding measurement 181098bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.796e+03, gradient 1.875e-04, dot -0.809; [5d58855e-70a8-4051-8839-d78a9ed38e02 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.38349463730410527, 0.3528701908642047, 0.3486000210305562, 0.2863821265995896
LBFGS Accumulation History: 3 points
Removed measurement c1a74d to history. Total: 4
th(0)=0.2863821265995896;dx=-3.5155697848025445E-8
New Minimum: 0.2863821265995896 > 0.25617702184222546
END: th(3917235.9465771476)=0.25617702184222546; dx=-2.1592373298483676E-8 evalInputDelta=0.030205104757364154
Fitness changed from 0.2863821265995896 to 0.25617702184222546
Iteration 29 complete. Error: 0.25617702184222546 Total: 22.4871; Orientation: 0.3822; Line Search: 14.7148
Adding measurement 3ad2883a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.108e+03, gradient 1.866e-04, dot -0.811; [5d58855e-70a8-4051-8839-d78a9ed38e02 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.3528701908642047, 0.3486000210305562, 0.2863821265995896, 0.25617702184222546
LBFGS Accumulation History: 3 points
Removed measurement 5cb8580 to history. Total: 4
th(0)=0.25617702184222546;dx=-3.482888489167069E-8
Armijo: th(8439429.01234569)=0.27414636678195947; dx=-9.36670505833706E-9 evalInputDelta=-0.01796934493973401
New Minimum: 0.25617702184222546 > 0.23123262013965062
END: th(4219714.506172845)=0.23123262013965062; dx=-1.8871398708210724E-8 evalInputDelta=0.024944401702574837
Fitness changed from 0.25617702184222546 to 0.23123262013965062
Iteration 30 complete. Error: 0.23123262013965062 Total: 29.9362; Orientation: 0.3766; Line Search: 22.0763
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/6ef43d1a-a224-4450-83d1-a15be189b508.jpg)
Final threshold in iteration 31: 0.23123262013965062 (> -Infinity) after 917.394s (< 3600.000s)
0.23123262013965062