Code from BasicOptimizer.scala:88 executed in 749.28 seconds (5.559 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: 904897709717
Reset training subject: 920155255286
Adding measurement 5eee3726 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=15.035571552813053;dx=-7.215459363801566E-7
New Minimum: 15.035571552813053 > 15.035568743944168
WOLFE (weak): th(2.154434690031884)=15.035568743944168; dx=-7.213132204604035E-7 evalInputDelta=2.808868885040283E-6
New Minimum: 15.035568743944168 > 15.035565298050642
WOLFE (weak): th(4.308869380063768)=15.035565298050642; dx=-7.218488179004813E-7 evalInputDelta=6.254762411117554E-6
New Minimum: 15.035565298050642 > 15.035552501678467
WOLFE (weak): th(12.926608140191302)=15.035552501678467; dx=-7.218245971669639E-7 evalInputDelta=1.905113458633423E-5
New Minimum: 15.035552501678467 > 15.03549537062645
WOLFE (weak): th(51.70643256076521)=15.03549537062645; dx=-7.211521059855747E-7 evalInputDelta=7.618218660354614E-5
New Minimum: 15.03549537062645 > 15.035190269351006
WOLFE (weak): th(258.53216280382605)=15.035190269351006; dx=-7.212017609492899E-7 evalInputDelta=3.812834620475769E-4
New Minimum: 15.035190269351006 > 15.033283151686192
WOLFE (weak): th(1551.1929768229563)=15.033283151686192; dx=-7.225260838672369E-7 evalInputDelta=0.0022884011268615723
New Minimum: 15.033283151686192 > 15.019620276987553
WOLFE (weak): th(10858.350837760694)=15.019620276987553; dx=-7.184379250071453E-7 evalInputDelta=0.01595127582550049
New Minimum: 15.019620276987553 > 14.910915814340115
WOLFE (weak): th(86866.80670208555)=14.910915814340115; dx=-6.88017879746394E-7 evalInputDelta=0.12465573847293854
New Minimum: 14.910915814340115 > 14.20119646191597
END: th(781801.26031877)=14.20119646191597; dx=-3.2016454987673047E-7 evalInputDelta=0.8343750908970833
Fitness changed from 15.035571552813053 to 14.20119646191597
Iteration 1 complete. Error: 14.20119646191597 Total: 206.5968; Orientation: 0.0429; Line Search: 159.0998
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7a6f3d50-91d8-4f6a-bf56-2070c33a995e.jpg)
Add
...skipping 5970 bytes...
979 > 9.304625779390335
END: th(584840.1930352102)=9.304625779390335; dx=-1.2300705045026634E-7 evalInputDelta=0.2691138833761215
Fitness changed from 9.573739662766457 to 9.304625779390335
Iteration 8 complete. Error: 9.304625779390335 Total: 80.0161; Orientation: 0.9989; Line Search: 63.3157
Adding measurement 370476b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.207e+04, gradient 4.060e-04, dot -0.454; [39133170-ee49-44de-b6c3-c77206754336 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 9.304625779390335, 13.20020542293787, 14.20119646191597, 15.035571552813053
LBFGS Accumulation History: 3 points
Removed measurement 370476b0 to history. Total: 3
th(0)=9.304625779390335;dx=-1.6445857156537478E-7
New Minimum: 9.304625779390335 > 8.977372989058495
END: th(1260000.0000000002)=8.977372989058495; dx=-1.1065073950412697E-7 evalInputDelta=0.3272527903318405
Fitness changed from 9.304625779390335 to 8.977372989058495
Iteration 9 complete. Error: 8.977372989058495 Total: 50.0558; Orientation: 1.0245; Line Search: 34.6462
Adding measurement 6cacc19f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.233e+04, gradient 4.186e-04, dot -0.441; [39133170-ee49-44de-b6c3-c77206754336 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 8.977372989058495, 13.20020542293787, 14.20119646191597, 15.035571552813053
LBFGS Accumulation History: 3 points
Removed measurement 6cacc19f to history. Total: 3
th(0)=8.977372989058495;dx=-1.7486082967037608E-7
New Minimum: 8.977372989058495 > 8.523012518882751
END: th(2714587.709440174)=8.523012518882751; dx=-7.299038691008512E-8 evalInputDelta=0.4543604701757431
Fitness changed from 8.977372989058495 to 8.523012518882751
Iteration 10 complete. Error: 8.523012518882751 Total: 49.7015; Orientation: 0.9976; Line Search: 32.5679
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f9f85490-dba8-400b-a72a-1d3587ce227c.jpg)
Final threshold in iteration 11: 8.523012518882751 (> -Infinity) after 749.281s (< 1800.000s)
8.523012518882751