Code from BasicOptimizer.scala:88 executed in 198.97 seconds (3.746 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: 756978457513
Reset training subject: 762690107475
Adding measurement 4ab17975 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=26.542984763160348;dx=-1.041927538464378E-4
New Minimum: 26.542984763160348 > 26.542290341109037
WOLFE (weak): th(2.154434690031884)=26.542290341109037; dx=-1.046066548351555E-4 evalInputDelta=6.944220513105392E-4
New Minimum: 26.542290341109037 > 26.541598793119192
WOLFE (weak): th(4.308869380063768)=26.541598793119192; dx=-1.0370221406236067E-4 evalInputDelta=0.0013859700411558151
New Minimum: 26.541598793119192 > 26.541451124474406
WOLFE (weak): th(12.926608140191302)=26.541451124474406; dx=-1.0416736443464459E-4 evalInputDelta=0.0015336386859416962
New Minimum: 26.541451124474406 > 26.5289358869195
WOLFE (weak): th(51.70643256076521)=26.5289358869195; dx=-9.960498883609798E-5 evalInputDelta=0.014048876240849495
New Minimum: 26.5289358869195 > 26.46726245433092
WOLFE (weak): th(258.53216280382605)=26.46726245433092; dx=-9.735544407764201E-5 evalInputDelta=0.07572230882942677
New Minimum: 26.46726245433092 > 26.116997005417943
WOLFE (weak): th(1551.1929768229563)=26.116997005417943; dx=-9.860425660483568E-5 evalInputDelta=0.42598775774240494
New Minimum: 26.116997005417943 > 24.126847080886364
END: th(10858.350837760694)=24.126847080886364; dx=-4.8531934485660606E-5 evalInputDelta=2.416137682273984
Fitness changed from 26.542984763160348 to 24.126847080886364
Iteration 1 complete. Error: 24.126847080886364 Total: 55.1825; Orientation: 0.0468; Line Search: 38.3888
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0cb9cf35-a267-45c0-a790-9018702460bf.jpg)
Adding measurement 51030c15 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=24.126847080886364;dx=-4.946839874980174E-5
New Minimum: 24.126847080886364 > 22.12587597221136
END: th(23393.607721408407)=22.12587597221136; dx=-2.4107840037997172E-5 evalInputDelta=2.000971108675003
Fitness changed from 24.126847080886364 to 22.12
...skipping 4867 bytes...
entation: 0.1602; Line Search: 9.4499
Adding measurement 73541854 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.533e+02, gradient 1.956e-03, dot -0.165; [f4abe78a-9ad9-4ab6-a749-0d5b1e277521 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 8.131852582097054, 22.12587597221136, 24.126847080886364, 26.542984763160348
LBFGS Accumulation History: 3 points
Removed measurement 73541854 to history. Total: 3
th(0)=8.131852582097054;dx=-3.78341422314034E-6
Armijo: th(5040000.000000002)=9.339027300477028; dx=2.952347084711312E-7 evalInputDelta=-1.2071747183799744
New Minimum: 8.131852582097054 > 7.584384247660637
WOLF (strong): th(2520000.000000001)=7.584384247660637; dx=7.74282164877868E-8 evalInputDelta=0.5474683344364166
New Minimum: 7.584384247660637 > 6.63001748919487
END: th(840000.0000000003)=6.63001748919487; dx=-2.484366112474527E-7 evalInputDelta=1.5018350929021835
Fitness changed from 8.131852582097054 to 6.63001748919487
Iteration 9 complete. Error: 6.63001748919487 Total: 24.9354; Orientation: 0.0781; Line Search: 19.8772
Adding measurement 699a413 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.342e+02, gradient 9.618e-04, dot -0.275; [f4abe78a-9ad9-4ab6-a749-0d5b1e277521 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.63001748919487, 22.12587597221136, 24.126847080886364, 26.542984763160348
LBFGS Accumulation History: 3 points
Removed measurement 699a413 to history. Total: 3
th(0)=6.63001748919487;dx=-8.897219872106819E-7
New Minimum: 6.63001748919487 > 5.392829343676567
END: th(1809725.139626783)=5.392829343676567; dx=-6.431512951024534E-8 evalInputDelta=1.237188145518303
Fitness changed from 6.63001748919487 to 5.392829343676567
Iteration 10 complete. Error: 5.392829343676567 Total: 14.5298; Orientation: 0.1790; Line Search: 9.5982
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/496078da-3ef4-4ba4-8bb2-b0dbeee371e9.jpg)
Final threshold in iteration 11: 5.392829343676567 (> -Infinity) after 198.952s (< 1800.000s)
5.392829343676567