BasicOptimizer.scala:89 executed in 206.63 seconds (2.841 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: 18478014693708
Reset training subject: 18482118209910
Adding measurement 2f175da to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.518648236989975;dx=-7.81876372438356E-7
New Minimum: -0.518648236989975 > -0.5186488330364227
END: th(2.154434690031884)=-0.5186488330364227; dx=-6.783645214904476E-7 evalInputDelta=5.960464477539062E-7
Fitness changed from -0.518648236989975 to -0.5186488330364227
Iteration 1 complete. Error: -0.5186488330364227 Total: 21.4429; Orientation: 0.0504; Line Search: 8.8307
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/307563db-1224-4a15-9e83-f1b32c8ee83a.jpg)
Adding measurement 64f29e59 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.5186488330364227;dx=-6.783508918187601E-7
New Minimum: -0.5186488330364227 > -0.518650472164154
WOLFE (weak): th(4.641588833612779)=-0.518650472164154; dx=-6.783410341653603E-7 evalInputDelta=1.6391277313232422E-6
New Minimum: -0.518650472164154 > -0.5186520516872406
WOLFE (weak): th(9.283177667225559)=-0.5186520516872406; dx=-6.783435359695026E-7 evalInputDelta=3.2186508178710938E-6
New Minimum: -0.5186520516872406 > -0.5186584144830704
WOLFE (weak): th(27.849533001676676)=-0.5186584144830704; dx=-6.783427962526456E-7 evalInputDelta=9.581446647644043E-6
New Minimum: -0.5186584144830704 > -0.5186866819858551
WOLFE (weak): th(111.3981320067067)=-0.5186866819858551; dx=-6.783333683549295E-7 evalInputDelta=3.784894943237305E-5
New Minimum: -0.5186866819858551 > -0.5188378691673279
WOLFE (weak): th(556.9906600335335)=-0.5188378691673279; dx=-6.782852191301028E-7 evalInputDelta=1.8903613090515137E-4
New Minimum: -0.5188378691673279 > -0.5197819024324417
WOLFE (weak): th(3341.9439602012008)=-0.5197819024324417; dx=-6.776130436819088E-7 evalInputDelta=0.001133069396018982
New Minimum: -0.5197819024324417 > -0.5265513211488724
WOLFE (weak): th(23393.607721408407)=-0.5265513211488724; dx=-6.727508056220073E-7 evalInputDelta=0.007902488112449646
New Minimum: -0.5265513211488724 > -0.5800017267465591
WOLFE (weak): th(187148.86177126726)=-0.5800017267465591; dx=-6.318168950178697E-7 evalInputDelta=0.061352893710136414
New Minimum: -0.5800017267465591 > -0.913750946521759
END: th(1684339.7559414054)=-0.913750946521759; dx=-2.862350851309764E-7 evalInputDelta=0.3951021134853363
Fitness changed from -0.5186488330364227 to -0.913750946521759
Iteration 2 complete. Error: -0.913750946521759 Total: 47.1628; Orientation: 0.0449; Line Search: 42.7180
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a6c4faf7-f4e3-4f9d-b637-aac239dbe9ae.jpg)
Adding measurement 23a1b724 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.913750946521759;dx=-2.8732528697363866E-7
New Minimum: -0.913750946521759 > -1.2440733760595322
END: th(3628800.0000000005)=-1.2440733760595322; dx=-1.1021281172155194E-7 evalInputDelta=0.33032242953777313
Fitness changed from -0.913750946521759 to -1.2440733760595322
Iteration 3 complete. Error: -1.2440733760595322 Total: 13.8220; Orientation: 0.0464; Line Search: 9.8019
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ef71d1d4-d245-43b5-9daf-84b279a318e5.jpg)
Adding measurement 1fc5bdd0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.655e+03, gradient 3.898e-04, dot -0.567; [f3b9e043-c899-4683-ad41-548a483a4e18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2440733760595322, -0.913750946521759, -0.5186488330364227, -0.518648236989975
LBFGS Accumulation History: 3 points
Removed measurement 1fc5bdd0 to history. Total: 3
th(0)=-1.2440733760595322;dx=-1.519499300964087E-7
New Minimum: -1.2440733760595322 > -1.5289194881916046
END: th(7818012.603187701)=-1.5289194881916046; dx=-2.7413222640234902E-8 evalInputDelta=0.28484611213207245
Fitness changed from -1.2440733760595322 to -1.5289194881916046
Iteration 4 complete. Error: -1.5289194881916046 Total: 13.6236; Orientation: 1.0145; Line Search: 8.4258
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/46f204db-1a02-4a97-ae31-021f502078c7.jpg)
Adding measurement 33835ed2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.499e+03, gradient 3.470e-04, dot -0.358; [f3b9e043-c899-4683-ad41-548a483a4e18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5289194881916046, -0.913750946521759, -0.5186488330364227, -0.518648236989975
LBFGS Accumulation History: 3 points
Removed measurement 33835ed2 to history. Total: 3
th(0)=-1.5289194881916046;dx=-1.203996452056771E-7
New Minimum: -1.5289194881916046 > -1.6478693038225174
WOLF (strong): th(1.6843397559414055E7)=-1.6478693038225174; dx=2.1528777241154686E-8 evalInputDelta=0.11894981563091278
New Minimum: -1.6478693038225174 > -1.7132186368107796
WOLF (strong): th(8421698.779707028)=-1.7132186368107796; dx=2.5416171047687976E-9 evalInputDelta=0.18429914861917496
END: th(2807232.926569009)=-1.6499553471803665; dx=-5.62098452970476E-8 evalInputDelta=0.1210358589887619
Fitness changed from -1.5289194881916046 to -1.7132186368107796
Iteration 5 complete. Error: -1.7132186368107796 Total: 22.3107; Orientation: 1.0061; Line Search: 17.0046
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/3848f16d-a71f-4a85-9a5f-9ca5b6847b32.jpg)
Adding measurement 1a5feb87 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.656e+03, gradient 3.011e-04, dot -0.311; [f3b9e043-c899-4683-ad41-548a483a4e18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7132186368107796, -0.913750946521759, -0.5186488330364227, -0.518648236989975
LBFGS Accumulation History: 3 points
Removed measurement 1a5feb87 to history. Total: 3
th(0)=-1.7132186368107796;dx=-9.065515218266563E-8
New Minimum: -1.7132186368107796 > -1.8563930243253708
END: th(6048000.000000001)=-1.8563930243253708; dx=-1.6894267347091895E-8 evalInputDelta=0.14317438751459122
Fitness changed from -1.7132186368107796 to -1.8563930243253708
Iteration 6 complete. Error: -1.8563930243253708 Total: 14.3331; Orientation: 1.0270; Line Search: 8.8335
Adding measurement 9a3f225 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.107e+03, gradient 2.022e-04, dot -0.502; [f3b9e043-c899-4683-ad41-548a483a4e18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8563930243253708, -0.913750946521759, -0.5186488330364227, -0.518648236989975
LBFGS Accumulation History: 3 points
Removed measurement 9a3f225 to history. Total: 3
th(0)=-1.8563930243253708;dx=-4.086529057786162E-8
New Minimum: -1.8563930243253708 > -1.9769158884882927
END: th(1.3030021005312836E7)=-1.9769158884882927; dx=-1.1630614725178191E-9 evalInputDelta=0.1205228641629219
Fitness changed from -1.8563930243253708 to -1.9769158884882927
Iteration 7 complete. Error: -1.9769158884882927 Total: 14.2959; Orientation: 1.0088; Line Search: 8.8075
Adding measurement 68b614f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.900e+03, gradient 2.412e-04, dot -0.294; [f3b9e043-c899-4683-ad41-548a483a4e18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9769158884882927, -0.913750946521759, -0.5186488330364227, -0.518648236989975
LBFGS Accumulation History: 3 points
Removed measurement 68b614f1 to history. Total: 3
th(0)=-1.9769158884882927;dx=-5.819605985847952E-8
Armijo: th(2.8072329265690096E7)=-1.8619480207562447; dx=2.4896601203693573E-8 evalInputDelta=-0.11496786773204803
New Minimum: -1.9769158884882927 > -2.0191984474658966
WOLF (strong): th(1.4036164632845048E7)=-2.0191984474658966; dx=1.8570225228087122E-8 evalInputDelta=0.04228255897760391
New Minimum: -2.0191984474658966 > -2.0533790290355682
END: th(4678721.544281683)=-2.0533790290355682; dx=-1.2352560715720113E-8 evalInputDelta=0.07646314054727554
Fitness changed from -1.9769158884882927 to -2.0533790290355682
Iteration 8 complete. Error: -2.0533790290355682 Total: 22.5641; Orientation: 1.4825; Line Search: 17.1703
Adding measurement 1bec1b21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.295e+03, gradient 1.505e-04, dot -0.528; [f3b9e043-c899-4683-ad41-548a483a4e18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0533790290355682, -0.913750946521759, -0.5186488330364227, -0.518648236989975
LBFGS Accumulation History: 3 points
Removed measurement 1bec1b21 to history. Total: 3
th(0)=-2.0533790290355682;dx=-2.2650714860561063E-8
New Minimum: -2.0533790290355682 > -2.12320364266634
END: th(1.0080000000000004E7)=-2.12320364266634; dx=-6.239262500449366E-9 evalInputDelta=0.06982461363077164
Fitness changed from -2.0533790290355682 to -2.12320364266634
Iteration 9 complete. Error: -2.12320364266634 Total: 13.7725; Orientation: 1.0980; Line Search: 8.6307
Adding measurement 3784e582 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.262e+03, gradient 1.651e-04, dot -0.416; [f3b9e043-c899-4683-ad41-548a483a4e18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.12320364266634, -0.913750946521759, -0.5186488330364227, -0.518648236989975
LBFGS Accumulation History: 3 points
Removed measurement 3784e582 to history. Total: 3
th(0)=-2.12320364266634;dx=-2.7263088495402455E-8
New Minimum: -2.12320364266634 > -2.1388384997844696
WOLF (strong): th(2.1716701675521396E7)=-2.1388384997844696; dx=7.554753778765056E-9 evalInputDelta=0.01563485711812973
New Minimum: -2.1388384997844696 > -2.1683322191238403
WOLF (strong): th(1.0858350837760698E7)=-2.1683322191238403; dx=2.360105275159857E-9 evalInputDelta=0.04512857645750046
END: th(3619450.279253566)=-2.1575581803917885; dx=-1.1498465944060756E-8 evalInputDelta=0.03435453772544861
Fitness changed from -2.12320364266634 to -2.1683322191238403
Iteration 10 complete. Error: -2.1683322191238403 Total: 23.2280; Orientation: 1.1169; Line Search: 17.3200
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/32a6b7ad-f8d8-43ba-a72c-4a4d5fbfff14.jpg)
Final threshold in iteration 11: -2.1683322191238403 (> -Infinity) after 206.627s (< 5400.000s)
Returns
-2.1683322191238403