Code from BasicOptimizer.scala:88 executed in 100.49 seconds (5.723 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: 1304430750981
Reset training subject: 1305110628656
Adding measurement af4841d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.5324523150920868;dx=-1.9192915061957797E-6
New Minimum: 0.5324523150920868 > 0.5324468910694122
WOLFE (weak): th(2.154434690031884)=0.5324468910694122; dx=-1.918459861389942E-6 evalInputDelta=5.424022674560547E-6
New Minimum: 0.5324468910694122 > 0.5324414819478989
WOLFE (weak): th(4.308869380063768)=0.5324414819478989; dx=-1.9165969154159477E-6 evalInputDelta=1.0833144187927246E-5
New Minimum: 0.5324414819478989 > 0.5324197709560394
WOLFE (weak): th(12.926608140191302)=0.5324197709560394; dx=-1.916970490247209E-6 evalInputDelta=3.254413604736328E-5
New Minimum: 0.5324197709560394 > 0.5323221385478973
WOLFE (weak): th(51.70643256076521)=0.5323221385478973; dx=-1.9173733385638445E-6 evalInputDelta=1.3017654418945312E-4
New Minimum: 0.5323221385478973 > 0.531801387667656
WOLFE (weak): th(258.53216280382605)=0.531801387667656; dx=-1.9183831512373332E-6 evalInputDelta=6.509274244308472E-4
New Minimum: 0.531801387667656 > 0.5285477489233017
WOLFE (weak): th(1551.1929768229563)=0.5285477489233017; dx=-1.9153315866021677E-6 evalInputDelta=0.003904566168785095
New Minimum: 0.5285477489233017 > 0.5052154958248138
WOLFE (weak): th(10858.350837760694)=0.5052154958248138; dx=-1.9035450767256278E-6 evalInputDelta=0.02723681926727295
New Minimum: 0.5052154958248138 > 0.32064273953437805
WOLFE (weak): th(86866.80670208555)=0.32064273953437805; dx=-1.7994713108544248E-6 evalInputDelta=0.21180957555770874
New Minimum: 0.32064273953437805 > -0.8381720185279846
END: th(781801.26031877)=-0.8381720185279846; dx=-7.858636962767267E-7 evalInputDelta=1.3706243336200714
Fitness changed from 0.5324523150920868 to -0.8381720185279846
Iteration 1 complete. Error: -0.8381720185279846 Total: 9.1291; Orientation: 0.0034; Line Search: 7.0397
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f5559f23-bcc7-48b4-8a41-b7cb42
...skipping 24925 bytes...
97152)=-2.0610340274870396; dx=-5.724917761369494E-9 evalInputDelta=0.003729250282049179
Fitness changed from -2.0573047772049904 to -2.0610340274870396
Iteration 28 complete. Error: -2.0610340274870396 Total: 4.2585; Orientation: 0.0755; Line Search: 3.5062
Adding measurement 4b91384c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.731e+03, gradient 7.207e-05, dot -0.605; [f0e15b50-1e26-48a1-a8ec-41315316d67a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0610340274870396, -1.3724285140633583, -0.8381720185279846, 0.5324523150920868
LBFGS Accumulation History: 3 points
Removed measurement 4b91384c to history. Total: 3
th(0)=-2.0610340274870396;dx=-5.147902378016245E-9
New Minimum: -2.0610340274870396 > -2.0652043037116528
END: th(1468963.4799664302)=-2.0652043037116528; dx=-4.4134589570476585E-9 evalInputDelta=0.00417027622461319
Fitness changed from -2.0610340274870396 to -2.0652043037116528
Iteration 29 complete. Error: -2.0652043037116528 Total: 2.1434; Orientation: 0.0978; Line Search: 1.4103
Adding measurement 569ddf7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.724e+03, gradient 6.798e-05, dot -0.626; [f0e15b50-1e26-48a1-a8ec-41315316d67a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0652043037116528, -1.3724285140633583, -0.8381720185279846, 0.5324523150920868
LBFGS Accumulation History: 3 points
Removed measurement 569ddf7d to history. Total: 3
th(0)=-2.0652043037116528;dx=-4.537264943587159E-9
New Minimum: -2.0652043037116528 > -2.072321053594351
END: th(3164785.8796296334)=-2.072321053594351; dx=-3.881848214511032E-9 evalInputDelta=0.007116749882698059
Fitness changed from -2.0652043037116528 to -2.072321053594351
Iteration 30 complete. Error: -2.072321053594351 Total: 4.2453; Orientation: 0.0821; Line Search: 3.4923
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/885076b9-e8e9-498f-9729-fe586a48abfb.jpg)
Final threshold in iteration 31: -2.072321053594351 (> -Infinity) after 100.486s (< 3600.000s)
-2.072321053594351