Code from BasicOptimizer.scala:88 executed in 66.39 seconds (1.801 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
val trainer = new IterativeTrainer(trainable)
trainer.setOrientation(orientation())
trainer.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = {
trainingMonitor.log(msg)
BasicOptimizer.this.log(msg)
}
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
trainer.setMaxIterations(trainingIterations)
trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
val result = trainer.run.asInstanceOf[lang.Double]
trainer.freeRef()
result
Reset training subject: 1513671378605
Reset training subject: 1515007470521
Adding measurement 4d9221b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=26.8945730086416;dx=-9.52364327305906E-6
New Minimum: 26.8945730086416 > 26.894549552351236
WOLFE (weak): th(2.154434690031884)=26.894549552351236; dx=-9.522649056391235E-6 evalInputDelta=2.3456290364265442E-5
New Minimum: 26.894549552351236 > 26.89452537894249
WOLFE (weak): th(4.308869380063768)=26.89452537894249; dx=-9.522876467486018E-6 evalInputDelta=4.76296991109848E-5
New Minimum: 26.89452537894249 > 26.894429421052337
WOLFE (weak): th(12.926608140191302)=26.894429421052337; dx=-9.526173006857812E-6 evalInputDelta=1.4358758926391602E-4
New Minimum: 26.894429421052337 > 26.89399914536625
WOLFE (weak): th(51.70643256076521)=26.89399914536625; dx=-9.513332592610147E-6 evalInputDelta=5.738632753491402E-4
New Minimum: 26.89399914536625 > 26.891700698062778
WOLFE (weak): th(258.53216280382605)=26.891700698062778; dx=-9.548644699861344E-6 evalInputDelta=0.0028723105788230896
New Minimum: 26.891700698062778 > 26.8772588763386
WOLFE (weak): th(1551.1929768229563)=26.8772588763386; dx=-9.641287711612414E-6 evalInputDelta=0.017314132302999496
New Minimum: 26.8772588763386 > 26.76960770972073
WOLFE (weak): th(10858.350837760694)=26.76960770972073; dx=-1.0084758075026774E-5 evalInputDelta=0.12496529892086983
New Minimum: 26.76960770972073 > 25.857018679380417
WOLFE (weak): th(86866.80670208555)=25.857018679380417; dx=-9.597783820745893E-6 evalInputDelta=1.0375543292611837
New Minimum: 25.857018679380417 > 21.154472518712282
END: th(781801.26031877)=21.154472518712282; dx=-4.2713778406371614E-6 evalInputDelta=5.740100489929318
Fitness changed from 26.8945730086416 to 21.154472518712282
Iteration 1 complete. Error: 21.154472518712282 Total: 17.2122; Orientation: 0.0027; Line Search: 13.1288
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3dc13a8e-7402-405f-8602-bcd013cce60f.jpg)
Adding measurement
...skipping 5839 bytes...
FGS Orientation magnitude: 1.742e+03, gradient 3.742e-04, dot -0.345; [33bd1f16-4e67-4d0c-866b-a6f1b6479e42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.6636924147605896, 12.999905198812485, 21.154472518712282, 26.8945730086416
LBFGS Accumulation History: 3 points
Removed measurement 6d5d0692 to history. Total: 3
th(0)=1.6636924147605896;dx=-1.3875238504446218E-7
New Minimum: 1.6636924147605896 > 1.2548709213733673
END: th(1.0080000000000002E7)=1.2548709213733673; dx=-1.6231224266910107E-8 evalInputDelta=0.4088214933872223
Fitness changed from 1.6636924147605896 to 1.2548709213733673
Iteration 9 complete. Error: 1.2548709213733673 Total: 4.0605; Orientation: 0.1309; Line Search: 2.6400
Adding measurement 7fdc4baf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.224e+03, gradient 5.026e-04, dot -0.285; [33bd1f16-4e67-4d0c-866b-a6f1b6479e42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2548709213733673, 12.999905198812485, 21.154472518712282, 26.8945730086416
LBFGS Accumulation History: 3 points
Removed measurement 7fdc4baf to history. Total: 3
th(0)=1.2548709213733673;dx=-2.504034769621201E-7
Armijo: th(2.1716701675521392E7)=4.9948886930942535; dx=1.5146756576383107E-7 evalInputDelta=-3.7400177717208862
Armijo: th(1.0858350837760696E7)=2.4873569011688232; dx=2.2906341056283894E-7 evalInputDelta=-1.232485979795456
New Minimum: 1.2548709213733673 > 0.8551146388053894
WOLF (strong): th(3619450.2792535652)=0.8551146388053894; dx=2.3554466247270308E-8 evalInputDelta=0.3997562825679779
END: th(904862.5698133913)=1.0354400724172592; dx=-1.8578974940962472E-7 evalInputDelta=0.2194308489561081
Fitness changed from 1.2548709213733673 to 0.8551146388053894
Iteration 10 complete. Error: 0.8551146388053894 Total: 8.4164; Orientation: 0.0708; Line Search: 6.9370
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/baac5248-d481-40df-aad2-e7ba0e8e772a.jpg)
Final threshold in iteration 11: 0.8551146388053894 (> -Infinity) after 66.392s (< 3600.000s)
0.8551146388053894