Code from BasicOptimizer.scala:88 executed in 95.95 seconds (3.542 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: 679252932446
Reset training subject: 680727949337
Adding measurement 18e6ea13 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=21.83305416535586;dx=-1.0883111102046265E-5
New Minimum: 21.83305416535586 > 21.833010874688625
WOLFE (weak): th(2.154434690031884)=21.833010874688625; dx=-1.0749127637723441E-5 evalInputDelta=4.329066723585129E-5
New Minimum: 21.833010874688625 > 21.832967452704906
WOLFE (weak): th(4.308869380063768)=21.832967452704906; dx=-1.0821433997821581E-5 evalInputDelta=8.671265095472336E-5
New Minimum: 21.832967452704906 > 21.832794196903706
WOLFE (weak): th(12.926608140191302)=21.832794196903706; dx=-1.0832016552852614E-5 evalInputDelta=2.5996845215559006E-4
New Minimum: 21.832794196903706 > 21.832012550905347
WOLFE (weak): th(51.70643256076521)=21.832012550905347; dx=-1.0894018927582444E-5 evalInputDelta=0.0010416144505143166
New Minimum: 21.832012550905347 > 21.82782490644604
WOLFE (weak): th(258.53216280382605)=21.82782490644604; dx=-1.0983461282707828E-5 evalInputDelta=0.00522925890982151
New Minimum: 21.82782490644604 > 21.801749737933278
WOLFE (weak): th(1551.1929768229563)=21.801749737933278; dx=-1.0476601743019483E-5 evalInputDelta=0.0313044274225831
New Minimum: 21.801749737933278 > 21.625492486171424
END: th(10858.350837760694)=21.625492486171424; dx=-7.239508719446057E-6 evalInputDelta=0.2075616791844368
Fitness changed from 21.83305416535586 to 21.625492486171424
Iteration 1 complete. Error: 21.625492486171424 Total: 14.6420; Orientation: 0.0379; Line Search: 10.5523
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/21159bd0-77c3-48ec-bde1-d9d788e19127.jpg)
Adding measurement 5964c2fb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=21.625492486171424;dx=-8.730229428823063E-6
New Minimum: 21.625492486171424 > 21.19411706738174
END: th(23393.607721408407)=21.19411706738174; dx=-6.9976909416460956E-6 evalInputDelta=0.4313754187896848
Fitness changed from 21.625492486171424
...skipping 8499 bytes...
=128.04765141010284; dx=-1.0848002335861216E-5 evalInputDelta=-120.18958838284016
Armijo: th(827100.9427200534)=128.05295073986053; dx=-9.683044125618341E-6 evalInputDelta=-120.19488771259785
Armijo: th(275700.3142400178)=128.04761603474617; dx=-1.4302766310886669E-5 evalInputDelta=-120.18955300748348
Armijo: th(68925.07856000445)=127.88587439060211; dx=-4.1474581910024455E-5 evalInputDelta=-120.02781136333942
Armijo: th(13785.01571200089)=127.38479733467102; dx=1.038004264970123E-4 evalInputDelta=-119.52673430740833
Armijo: th(2297.502618666815)=124.47751206159592; dx=8.664700460173059E-4 evalInputDelta=-116.61944903433323
Armijo: th(328.214659809545)=98.8354335129261; dx=0.02293586821582481 evalInputDelta=-90.97737048566341
Armijo: th(41.02683247619313)=23.880142956972122; dx=0.16182399892559918 evalInputDelta=-16.022079929709435
Armijo: th(4.558536941799236)=8.33517074584961; dx=0.07330527353215477 evalInputDelta=-0.4771077185869217
Armijo: th(0.4558536941799236)=7.867122113704681; dx=0.0038526810911763704 evalInputDelta=-0.009059086441993713
Armijo: th(0.0414412449254476)=7.85839107632637; dx=-0.005316366742769786 evalInputDelta=-3.2804906368255615E-4
Armijo: th(0.0034534370771206334)=7.858086362481117; dx=-0.006193362600940156 evalInputDelta=-2.333521842956543E-5
Armijo: th(2.656490059323564E-4)=7.858065024018288; dx=-0.00600537769681145 evalInputDelta=-1.996755599975586E-6
Armijo: th(1.8974928995168314E-5)=7.858063071966171; dx=-0.005914671286677161 evalInputDelta=-4.470348358154297E-8
New Minimum: 7.858063027262688 > 7.858062982559204
END: th(1.2649952663445543E-6)=7.858062982559204; dx=-0.004991062566384593 evalInputDelta=4.470348358154297E-8
Fitness changed from 7.858063027262688 to 7.858062982559204
Iteration 10 complete. Error: 7.858062982559204 Total: 23.1637; Orientation: 0.1409; Line Search: 21.7880
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1702247d-4c65-45f5-994d-dfd752d69f54.jpg)
Final threshold in iteration 11: 7.858062982559204 (> -Infinity) after 95.935s (< 1800.000s)
7.858062982559204