BasicOptimizer.scala:89 executed in 96.36 seconds (1.292 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: 283502350132700
Reset training subject: 283504348837200
Adding measurement 28580252 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-48.65710531889379;dx=-4.732085159769364E-6
New Minimum: -48.65710531889379 > -48.657111096671734
END: th(2.154434690031884)=-48.657111096671734; dx=-3.6679681747862E-6 evalInputDelta=5.777777943194451E-6
Fitness changed from -48.65710531889379 to -48.657111096671734
Iteration 1 complete. Error: -48.657111096671734 Total: 9.6152; Orientation: 0.0593; Line Search: 3.9209
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/de79ee66-d0d0-41d1-8483-c77189e058bf.jpg)
Adding measurement 4403e577 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-48.657111096671734;dx=-3.6679662377480035E-6
New Minimum: -48.657111096671734 > -48.65713035592658
WOLFE (weak): th(4.641588833612779)=-48.65713035592658; dx=-3.6679640042655327E-6 evalInputDelta=1.92592548486914E-5
New Minimum: -48.65713035592658 > -48.65714961517382
WOLFE (weak): th(9.283177667225559)=-48.65714961517382; dx=-3.667959485610451E-6 evalInputDelta=3.85185020874701E-5
New Minimum: -48.65714961517382 > -48.6572170224791
WOLFE (weak): th(27.849533001676676)=-48.6572170224791; dx=-3.667946949805081E-6 evalInputDelta=1.0592580736812351E-4
New Minimum: -48.6572170224791 > -48.65752131715209
WOLFE (weak): th(111.3981320067067)=-48.65752131715209; dx=-3.6678996666122493E-6 evalInputDelta=4.102204803544396E-4
New Minimum: -48.65752131715209 > -48.65915638695553
WOLFE (weak): th(556.9906600335335)=-48.65915638695553; dx=-3.667864488983435E-6 evalInputDelta=0.002045290283795964
New Minimum: -48.65915638695553 > -48.66936807101621
WOLFE (weak): th(3341.9439602012008)=-48.66936807101621; dx=-3.6662992979223433E-6 evalInputDelta=0.012256974344474258
New Minimum: -48.66936807101621 > -48.74278943804795
WOLFE (weak): th(23393.607721408407)=-48.74278943804795; dx=-3.657074159910774E-6 evalInputDelta=0.08567834137621588
New Minimum: -48.74278943804795 > -49.334918933535775
WOLFE (weak): th(187148.86177126726)=-49.334918933535775; dx=-3.5744996769510477E-6 evalInputDelta=0.6778078368640408
New Minimum: -49.334918933535775 > -54.04654997960171
END: th(1684339.7559414054)=-54.04654997960171; dx=-2.6984287648324403E-6 evalInputDelta=5.389438882929973
Fitness changed from -48.657111096671734 to -54.04654997960171
Iteration 2 complete. Error: -54.04654997960171 Total: 21.2822; Orientation: 0.0587; Line Search: 19.1064
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5d3f188e-90d9-4697-9488-c472cd018cfe.jpg)
Adding measurement 1b57818f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-54.04654997960171;dx=-2.388651213773454E-6
New Minimum: -54.04654997960171 > -60.89426086535014
END: th(3628800.0000000005)=-60.89426086535014; dx=-1.3972458051406574E-6 evalInputDelta=6.847710885748434
Fitness changed from -54.04654997960171 to -60.89426086535014
Iteration 3 complete. Error: -60.89426086535014 Total: 6.1294; Orientation: 0.0606; Line Search: 3.8829
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9472e8c1-9b94-4e72-9633-4f1ed3c32653.jpg)
Adding measurement 5e3bb28f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.831e+03, gradient 1.206e-03, dot -0.721; [7e062531-f73b-418a-9116-9f477ae88453 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.89426086535014, -54.04654997960171, -48.657111096671734, -48.65710531889379
LBFGS Accumulation History: 3 points
Removed measurement 5e3bb28f to history. Total: 3
th(0)=-60.89426086535014;dx=-1.4538654170057242E-6
New Minimum: -60.89426086535014 > -68.60082021368078
END: th(7818012.603187701)=-68.60082021368078; dx=-6.001725508247659E-7 evalInputDelta=7.706559348330636
Fitness changed from -60.89426086535014 to -68.60082021368078
Iteration 4 complete. Error: -68.60082021368078 Total: 6.7117; Orientation: 1.0258; Line Search: 3.5856
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/bc6ce439-afe4-4760-a7d9-19a0a90e71fe.jpg)
Adding measurement 76d19cc7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.984e+03, gradient 1.155e-03, dot -0.484; [7e062531-f73b-418a-9116-9f477ae88453 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.60082021368078, -54.04654997960171, -48.657111096671734, -48.65710531889379
LBFGS Accumulation History: 3 points
Removed measurement 76d19cc7 to history. Total: 3
th(0)=-68.60082021368078;dx=-1.3349370414309777E-6
New Minimum: -68.60082021368078 > -73.02202195968141
WOLF (strong): th(1.6843397559414055E7)=-73.02202195968141; dx=1.3961623381297645E-7 evalInputDelta=4.421201746000634
New Minimum: -73.02202195968141 > -73.50914884853007
END: th(8421698.779707028)=-73.50914884853007; dx=-8.89278511936001E-8 evalInputDelta=4.908328634849298
Fitness changed from -68.60082021368078 to -73.50914884853007
Iteration 5 complete. Error: -73.50914884853007 Total: 9.7302; Orientation: 1.2076; Line Search: 6.2704
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6b02bc2c-9028-4ecd-ad1c-fad04239fe74.jpg)
Adding measurement 2517f693 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.066e+04, gradient 1.293e-03, dot -0.365; [7e062531-f73b-418a-9116-9f477ae88453 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.50914884853007, -54.04654997960171, -48.657111096671734, -48.65710531889379
LBFGS Accumulation History: 3 points
Removed measurement 2517f693 to history. Total: 3
th(0)=-73.50914884853007;dx=-1.6722451676164328E-6
Armijo: th(1.8144000000000004E7)=-73.48085543275685; dx=4.426090253540361E-7 evalInputDelta=-0.028293415773219976
New Minimum: -73.50914884853007 > -77.7767007557569
WOLF (strong): th(9072000.000000002)=-77.7767007557569; dx=3.91219011043888E-7 evalInputDelta=4.2675519072268315
END: th(3024000.0000000005)=-77.35656894329058; dx=-8.248209308188809E-7 evalInputDelta=3.8474200947605084
Fitness changed from -73.50914884853007 to -77.7767007557569
Iteration 6 complete. Error: -77.7767007557569 Total: 10.7140; Orientation: 1.0080; Line Search: 7.5276
Adding measurement a59dc52 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.326e+04, gradient 1.387e-03, dot -0.286; [7e062531-f73b-418a-9116-9f477ae88453 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.7767007557569, -54.04654997960171, -48.657111096671734, -48.65710531889379
LBFGS Accumulation History: 3 points
Removed measurement a59dc52 to history. Total: 3
th(0)=-77.7767007557569;dx=-1.9231522352005525E-6
New Minimum: -77.7767007557569 > -83.85468222200642
WOLF (strong): th(6515010.502656418)=-83.85468222200642; dx=1.2905439680580353E-7 evalInputDelta=6.077981466249511
END: th(3257505.251328209)=-82.59482439500076; dx=-9.636386906066813E-7 evalInputDelta=4.818123639243851
Fitness changed from -77.7767007557569 to -83.85468222200642
Iteration 7 complete. Error: -83.85468222200642 Total: 8.4340; Orientation: 1.0073; Line Search: 5.6533
Adding measurement 7b7ca745 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.119e+04, gradient 1.039e-03, dot -0.474; [7e062531-f73b-418a-9116-9f477ae88453 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.85468222200642, -54.04654997960171, -48.657111096671734, -48.65710531889379
LBFGS Accumulation History: 3 points
Removed measurement 7b7ca745 to history. Total: 3
th(0)=-83.85468222200642;dx=-1.079907409586276E-6
New Minimum: -83.85468222200642 > -87.5244748597404
END: th(7018082.316422524)=-87.5244748597404; dx=-2.034605060090049E-8 evalInputDelta=3.669792637733977
Fitness changed from -83.85468222200642 to -87.5244748597404
Iteration 8 complete. Error: -87.5244748597404 Total: 6.4509; Orientation: 0.9844; Line Search: 3.7144
Adding measurement 5aeeb1da to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.571e+04, gradient 1.017e-03, dot -0.472; [7e062531-f73b-418a-9116-9f477ae88453 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.5244748597404, -54.04654997960171, -48.657111096671734, -48.65710531889379
LBFGS Accumulation History: 3 points
Removed measurement 5aeeb1da to history. Total: 3
th(0)=-87.5244748597404;dx=-1.0342668115832925E-6
New Minimum: -87.5244748597404 > -88.6920830742836
WOLF (strong): th(1.5120000000000006E7)=-88.6920830742836; dx=3.6821388906812507E-7 evalInputDelta=1.1676082145432076
New Minimum: -88.6920830742836 > -90.76399118823414
WOLF (strong): th(7560000.000000003)=-90.76399118823414; dx=8.803038599636488E-8 evalInputDelta=3.2395163284937496
END: th(2520000.000000001)=-89.63465475403638; dx=-6.235615363213955E-7 evalInputDelta=2.1101798942959817
Fitness changed from -87.5244748597404 to -90.76399118823414
Iteration 9 complete. Error: -90.76399118823414 Total: 10.3333; Orientation: 1.0894; Line Search: 7.4414
Adding measurement 3c46b83e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.773e+04, gradient 1.049e-03, dot -0.432; [7e062531-f73b-418a-9116-9f477ae88453 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.76399118823414, -54.04654997960171, -48.657111096671734, -48.65710531889379
LBFGS Accumulation History: 3 points
Removed measurement 3c46b83e to history. Total: 3
th(0)=-90.76399118823414;dx=-1.10014694366656E-6
New Minimum: -90.76399118823414 > -94.11186470687109
END: th(5429175.418880349)=-94.11186470687109; dx=-1.0809750274121632E-7 evalInputDelta=3.347873518636945
Fitness changed from -90.76399118823414 to -94.11186470687109
Iteration 10 complete. Error: -94.11186470687109 Total: 6.6100; Orientation: 1.0382; Line Search: 3.7752
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/8d2c8b91-b91d-4b5e-8d14-7ac419b57935.jpg)
Final threshold in iteration 11: -94.11186470687109 (> -Infinity) after 96.362s (< 5400.000s)
Returns
-94.11186470687109