Code from BasicOptimizer.scala:88 executed in 964.62 seconds (7.082 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: 5992140605970
Reset training subject: 6012502084242
Adding measurement ea2b47e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.471497729420662;dx=-1.6175350259621882E-7
New Minimum: 8.471497729420662 > 8.471497595310211
WOLFE (weak): th(2.154434690031884)=8.471497595310211; dx=-1.614120778280284E-7 evalInputDelta=1.341104507446289E-7
New Minimum: 8.471497595310211 > 8.471496999263763
WOLFE (weak): th(4.308869380063768)=8.471496999263763; dx=-1.6141529259062532E-7 evalInputDelta=7.301568984985352E-7
New Minimum: 8.471496999263763 > 8.471494495868683
WOLFE (weak): th(12.926608140191302)=8.471494495868683; dx=-1.6141340206493314E-7 evalInputDelta=3.2335519790649414E-6
New Minimum: 8.471494495868683 > 8.471485421061516
WOLFE (weak): th(51.70643256076521)=8.471485421061516; dx=-1.614132114982067E-7 evalInputDelta=1.2308359146118164E-5
New Minimum: 8.471485421061516 > 8.47143591940403
WOLFE (weak): th(258.53216280382605)=8.47143591940403; dx=-1.614199656772756E-7 evalInputDelta=6.181001663208008E-5
New Minimum: 8.47143591940403 > 8.471128568053246
WOLFE (weak): th(1551.1929768229563)=8.471128568053246; dx=-1.614077236947484E-7 evalInputDelta=3.6916136741638184E-4
New Minimum: 8.471128568053246 > 8.468911454081535
WOLFE (weak): th(10858.350837760694)=8.468911454081535; dx=-1.6133196025359822E-7 evalInputDelta=0.002586275339126587
New Minimum: 8.468911454081535 > 8.450832977890968
WOLFE (weak): th(86866.80670208555)=8.450832977890968; dx=-1.608734725789864E-7 evalInputDelta=0.020664751529693604
New Minimum: 8.450832977890968 > 8.288001343607903
WOLFE (weak): th(781801.26031877)=8.288001343607903; dx=-1.5598506822147578E-7 evalInputDelta=0.1834963858127594
New Minimum: 8.288001343607903 > 7.056652292609215
END: th(7818012.6031877)=7.056652292609215; dx=-8.243334640251219E-8 evalInputDelta=1.4148454368114471
Fitness changed from 8.471497729420662 to 7.056652292609215
Iteration 1 complete. Error: 7.056652292609215 Total: 275.6170; Orient
...skipping 6228 bytes...
-0.40417006611824036 Total: 103.8094; Orientation: 1.8941; Line Search: 82.4747
Adding measurement 392b0a11 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.594e+03, gradient 1.014e-04, dot -0.370; [66610805-8cbf-419f-8949-733b3c225705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.40417006611824036, 5.471987366676331, 7.056652292609215, 8.471497729420662
LBFGS Accumulation History: 3 points
Removed measurement 392b0a11 to history. Total: 3
th(0)=-0.40417006611824036;dx=-1.0276579527619723E-8
New Minimum: -0.40417006611824036 > -0.6475242525339127
END: th(3.7800000000000015E7)=-0.6475242525339127; dx=-9.18255033733292E-10 evalInputDelta=0.2433541864156723
Fitness changed from -0.40417006611824036 to -0.6475242525339127
Iteration 9 complete. Error: -0.6475242525339127 Total: 58.1951; Orientation: 1.8518; Line Search: 36.9379
Adding measurement 4719c7a3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.726e+03, gradient 7.683e-05, dot -0.463; [66610805-8cbf-419f-8949-733b3c225705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.6475242525339127, 5.471987366676331, 7.056652292609215, 8.471497729420662
LBFGS Accumulation History: 3 points
Removed measurement 4719c7a3 to history. Total: 3
th(0)=-0.6475242525339127;dx=-5.900294352806012E-9
New Minimum: -0.6475242525339127 > -0.7872218042612076
WOLF (strong): th(8.143763128320524E7)=-0.7872218042612076; dx=1.0727789118112582E-9 evalInputDelta=0.13969755172729492
New Minimum: -0.7872218042612076 > -0.8304764628410339
END: th(4.071881564160262E7)=-0.8304764628410339; dx=-1.7995607064127571E-9 evalInputDelta=0.18295221030712128
Fitness changed from -0.6475242525339127 to -0.8304764628410339
Iteration 10 complete. Error: -0.8304764628410339 Total: 78.8591; Orientation: 1.8671; Line Search: 58.7027
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a38171bd-aca7-4274-945d-d5708634d7b0.jpg)
Final threshold in iteration 11: -0.8304764628410339 (> -Infinity) after 964.615s (< 3600.000s)
-0.8304764628410339