Code from BasicOptimizer.scala:88 executed in 1945.90 seconds (4.257 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: 5733737000984
Reset training subject: 5784980907138
Adding measurement 15f6b32d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.347957402467728;dx=-3.7661840243712477E-7
New Minimum: 4.347957402467728 > 4.347956448793411
WOLFE (weak): th(2.154434690031884)=4.347956448793411; dx=-3.757478209731094E-7 evalInputDelta=9.5367431640625E-7
New Minimum: 4.347956448793411 > 4.347954750061035
WOLFE (weak): th(4.308869380063768)=4.347954750061035; dx=-3.7603354994187414E-7 evalInputDelta=2.652406692504883E-6
New Minimum: 4.347954750061035 > 4.347949713468552
WOLFE (weak): th(12.926608140191302)=4.347949713468552; dx=-3.756974270413649E-7 evalInputDelta=7.68899917602539E-6
New Minimum: 4.347949713468552 > 4.347926199436188
WOLFE (weak): th(51.70643256076521)=4.347926199436188; dx=-3.847753922380856E-7 evalInputDelta=3.120303153991699E-5
New Minimum: 4.347926199436188 > 4.347801148891449
WOLFE (weak): th(258.53216280382605)=4.347801148891449; dx=-3.75725453417939E-7 evalInputDelta=1.5625357627868652E-4
New Minimum: 4.347801148891449 > 4.3470184952020645
WOLFE (weak): th(1551.1929768229563)=4.3470184952020645; dx=-3.761485075493509E-7 evalInputDelta=9.38907265663147E-4
New Minimum: 4.3470184952020645 > 4.341398671269417
WOLFE (weak): th(10858.350837760694)=4.341398671269417; dx=-3.8661647658244747E-7 evalInputDelta=0.006558731198310852
New Minimum: 4.341398671269417 > 4.296650364995003
WOLFE (weak): th(86866.80670208555)=4.296650364995003; dx=-3.545082466157018E-7 evalInputDelta=0.051307037472724915
New Minimum: 4.296650364995003 > 3.966387078166008
END: th(781801.26031877)=3.966387078166008; dx=-2.411292879731269E-7 evalInputDelta=0.38157032430171967
Fitness changed from 4.347957402467728 to 3.966387078166008
Iteration 1 complete. Error: 3.966387078166008 Total: 659.2399; Orientation: 0.0541; Line Search: 506.9336
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ec00d342-33ec-4dd1-a701-ee5bf75abe2a.jpg)
Adding measurement 6f
...skipping 3758 bytes...
eration 6 complete. Error: 2.2754702121019363 Total: 205.5139; Orientation: 1.2614; Line Search: 153.5009
Adding measurement 195e3b49 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.989e+03, gradient 3.613e-04, dot -0.236; [59f28e37-d749-4cad-99a9-f0294ef48481 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.2754702121019363, 3.5142758041620255, 3.966387078166008, 4.347957402467728
LBFGS Accumulation History: 3 points
Removed measurement 195e3b49 to history. Total: 3
th(0)=2.2754702121019363;dx=-1.2679396080380462E-7
Armijo: th(1.954503150796925E7)=3.2215867415070534; dx=1.4735969236731204E-8 evalInputDelta=-0.946116529405117
New Minimum: 2.2754702121019363 > 1.967977449297905
WOLF (strong): th(9772515.753984625)=1.967977449297905; dx=3.0046469556972317E-10 evalInputDelta=0.30749276280403137
New Minimum: 1.967977449297905 > 1.7838464751839638
END: th(3257505.251328208)=1.7838464751839638; dx=-5.1656281850611585E-8 evalInputDelta=0.49162373691797256
Fitness changed from 2.2754702121019363 to 1.7838464751839638
Iteration 7 complete. Error: 1.7838464751839638 Total: 261.2870; Orientation: 1.2869; Line Search: 207.2251
Adding measurement 79aab91c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.993e+03, gradient 2.667e-04, dot -0.291; [59f28e37-d749-4cad-99a9-f0294ef48481 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.7838464751839638, 3.5142758041620255, 3.966387078166008, 4.347957402467728
LBFGS Accumulation History: 3 points
Removed measurement 79aab91c to history. Total: 3
th(0)=1.7838464751839638;dx=-7.049974983019795E-8
New Minimum: 1.7838464751839638 > 1.4520199745893478
END: th(7018082.316422522)=1.4520199745893478; dx=-2.3366133737420086E-8 evalInputDelta=0.33182650059461594
Fitness changed from 1.7838464751839638 to 1.4520199745893478
Iteration 8 complete. Error: 1.4520199745893478 Total: 150.3038; Orientation: 1.2597; Line Search: 98.8074
Final threshold in iteration 8: 1.4520199745893478 (> -Infinity) after 1945.901s (< 1800.000s)
1.4520199745893478