Code from BasicOptimizer.scala:88 executed in 243.99 seconds (5.155 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: 1392308725015
Reset training subject: 1397985121173
Adding measurement 52c38ddf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=22.364257492125034;dx=-3.917668806614681E-5
New Minimum: 22.364257492125034 > 22.364138778299093
WOLFE (weak): th(2.154434690031884)=22.364138778299093; dx=-3.9457889775564465E-5 evalInputDelta=1.1871382594108582E-4
New Minimum: 22.364138778299093 > 22.36401953920722
WOLFE (weak): th(4.308869380063768)=22.36401953920722; dx=-3.8858256360437435E-5 evalInputDelta=2.3795291781425476E-4
New Minimum: 22.36401953920722 > 22.36354281567037
WOLFE (weak): th(12.926608140191302)=22.36354281567037; dx=-3.9489758496799956E-5 evalInputDelta=7.146764546632767E-4
New Minimum: 22.36354281567037 > 22.361397003754973
WOLFE (weak): th(51.70643256076521)=22.361397003754973; dx=-3.952728767794348E-5 evalInputDelta=0.0028604883700609207
New Minimum: 22.361397003754973 > 22.349950101226568
WOLFE (weak): th(258.53216280382605)=22.349950101226568; dx=-3.8852068145503224E-5 evalInputDelta=0.01430739089846611
New Minimum: 22.349950101226568 > 22.28074649348855
WOLFE (weak): th(1551.1929768229563)=22.28074649348855; dx=-3.730597333151542E-5 evalInputDelta=0.08351099863648415
New Minimum: 22.28074649348855 > 21.837713005021214
END: th(10858.350837760694)=21.837713005021214; dx=-2.5771688350792613E-5 evalInputDelta=0.5265444871038198
Fitness changed from 22.364257492125034 to 21.837713005021214
Iteration 1 complete. Error: 21.837713005021214 Total: 63.3703; Orientation: 0.0598; Line Search: 46.8462
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 26bdb797 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=21.837713005021214;dx=-2.4380978817372346E-5
New Minimum: 21.837713005021214 > 21.034402288496494
END: th(23393.607721408407)=21.034402288496494; dx=-1.452079440237499E-5 evalInputDelta=0.8033107165247202
Fitness changed from 21.837713005021214
...skipping 5118 bytes...
Total: 3
Rejected: LBFGS Orientation magnitude: 5.705e+03, gradient 2.077e-03, dot -0.142; [463e1150-d84a-498d-85db-cfa54abca451 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.2635373920202255, 21.034402288496494, 21.837713005021214, 22.364257492125034
LBFGS Accumulation History: 3 points
Removed measurement 22a84968 to history. Total: 3
th(0)=7.2635373920202255;dx=-4.1336548403154075E-6
Armijo: th(2520000.000000001)=7.818547531962395; dx=1.10072474443307E-7 evalInputDelta=-0.5550101399421692
New Minimum: 7.2635373920202255 > 6.499529272317886
END: th(1260000.0000000005)=6.499529272317886; dx=-9.368228542446566E-8 evalInputDelta=0.7640081197023392
Fitness changed from 7.2635373920202255 to 6.499529272317886
Iteration 9 complete. Error: 6.499529272317886 Total: 24.4787; Orientation: 0.3992; Line Search: 17.8642
Adding measurement 4099d2a8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.741e+02, gradient 2.082e-03, dot -0.059; [463e1150-d84a-498d-85db-cfa54abca451 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.499529272317886, 21.034402288496494, 21.837713005021214, 22.364257492125034
LBFGS Accumulation History: 3 points
Removed measurement 4099d2a8 to history. Total: 3
th(0)=6.499529272317886;dx=-4.3006534701810196E-6
Armijo: th(2714587.7094401745)=8.498299151659012; dx=1.39584784027097E-7 evalInputDelta=-1.9987698793411255
Armijo: th(1357293.8547200873)=6.698281407356262; dx=-9.300458035068685E-8 evalInputDelta=-0.19875213503837585
New Minimum: 6.499529272317886 > 5.818278357386589
END: th(452431.2849066958)=5.818278357386589; dx=-1.4298904750320975E-7 evalInputDelta=0.6812509149312973
Fitness changed from 6.499529272317886 to 5.818278357386589
Iteration 10 complete. Error: 5.818278357386589 Total: 27.6277; Orientation: 0.2905; Line Search: 21.8640
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: 5.818278357386589 (> -Infinity) after 243.971s (< 1800.000s)
5.818278357386589