BasicOptimizer.scala:89 executed in 211.97 seconds (1.910 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: 18832582213495
Reset training subject: 18836752852544
Adding measurement 56b9a7da to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.6734167635440826;dx=-5.803649729974003E-7
New Minimum: -0.6734167635440826 > -0.6734171509742737
END: th(2.154434690031884)=-0.6734171509742737; dx=-5.038545499944327E-7 evalInputDelta=3.8743019104003906E-7
Fitness changed from -0.6734167635440826 to -0.6734171509742737
Iteration 1 complete. Error: -0.6734171509742737 Total: 22.1859; Orientation: 0.0460; Line Search: 8.8555
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e605a626-3121-4964-a981-7abe5cf5e7e6.jpg)
Adding measurement 4dda8470 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.6734171509742737;dx=-5.038597783452792E-7
New Minimum: -0.6734171509742737 > -0.6734185665845871
WOLFE (weak): th(4.641588833612779)=-0.6734185665845871; dx=-5.038531587967891E-7 evalInputDelta=1.4156103134155273E-6
New Minimum: -0.6734185665845871 > -0.6734196841716766
WOLFE (weak): th(9.283177667225559)=-0.6734196841716766; dx=-5.038521220759011E-7 evalInputDelta=2.5331974029541016E-6
New Minimum: -0.6734196841716766 > -0.6734243035316467
WOLFE (weak): th(27.849533001676676)=-0.6734243035316467; dx=-5.038526758335611E-7 evalInputDelta=7.152557373046875E-6
New Minimum: -0.6734243035316467 > -0.6734454184770584
WOLFE (weak): th(111.3981320067067)=-0.6734454184770584; dx=-5.038313539877699E-7 evalInputDelta=2.8267502784729004E-5
New Minimum: -0.6734454184770584 > -0.6735576391220093
WOLFE (weak): th(556.9906600335335)=-0.6735576391220093; dx=-5.037884494827808E-7 evalInputDelta=1.404881477355957E-4
New Minimum: -0.6735576391220093 > -0.6742588430643082
WOLFE (weak): th(3341.9439602012008)=-0.6742588430643082; dx=-5.033166870626355E-7 evalInputDelta=8.416920900344849E-4
New Minimum: -0.6742588430643082 > -0.6792887151241302
WOLFE (weak): th(23393.607721408407)=-0.6792887151241302; dx=-4.999706736120015E-7 evalInputDelta=0.005871564149856567
New Minimum: -0.6792887151241302 > -0.7191645056009293
WOLFE (weak): th(187148.86177126726)=-0.7191645056009293; dx=-4.734393142860831E-7 evalInputDelta=0.04574735462665558
New Minimum: -0.7191645056009293 > -0.9853516668081284
END: th(1684339.7559414054)=-0.9853516668081284; dx=-2.5257042461608856E-7 evalInputDelta=0.3119345158338547
Fitness changed from -0.6734171509742737 to -0.9853516668081284
Iteration 2 complete. Error: -0.9853516668081284 Total: 48.0624; Orientation: 0.0454; Line Search: 44.0105
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/249a5608-5af2-4bb1-80d5-ef5cda7ad2b6.jpg)
Adding measurement 3c76f4d2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.9853516668081284;dx=-2.2943405763749103E-7
New Minimum: -0.9853516668081284 > -1.2791408598423004
END: th(3628800.0000000005)=-1.2791408598423004; dx=-1.093110422212946E-7 evalInputDelta=0.29378919303417206
Fitness changed from -0.9853516668081284 to -1.2791408598423004
Iteration 3 complete. Error: -1.2791408598423004 Total: 14.0017; Orientation: 0.0440; Line Search: 9.6811
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c2311b07-a9bc-4ba9-9faf-a819253c052e.jpg)
Adding measurement 2d4c1851 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.762e+03, gradient 3.488e-04, dot -0.659; [f9dea7be-b07f-4db5-b006-cfbab455a05a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2791408598423004, -0.9853516668081284, -0.6734171509742737, -0.6734167635440826
LBFGS Accumulation History: 3 points
Removed measurement 2d4c1851 to history. Total: 3
th(0)=-1.2791408598423004;dx=-1.2166611112597834E-7
New Minimum: -1.2791408598423004 > -1.5520213693380356
END: th(7818012.603187701)=-1.5520213693380356; dx=-3.5308302274251174E-8 evalInputDelta=0.27288050949573517
Fitness changed from -1.2791408598423004 to -1.5520213693380356
Iteration 4 complete. Error: -1.5520213693380356 Total: 13.4231; Orientation: 1.0129; Line Search: 8.1241
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/56e1c2b8-b318-4e2c-b413-4c3ad6cfaf89.jpg)
Adding measurement 4c7eeb19 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.624e+03, gradient 3.031e-04, dot -0.432; [f9dea7be-b07f-4db5-b006-cfbab455a05a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5520213693380356, -0.9853516668081284, -0.6734171509742737, -0.6734167635440826
LBFGS Accumulation History: 3 points
Removed measurement 4c7eeb19 to history. Total: 3
th(0)=-1.5520213693380356;dx=-9.185681809086281E-8
New Minimum: -1.5520213693380356 > -1.6979526579380035
WOLF (strong): th(1.6843397559414055E7)=-1.6979526579380035; dx=1.0282599175137932E-8 evalInputDelta=0.14593128859996796
New Minimum: -1.6979526579380035 > -1.7134788036346436
END: th(8421698.779707028)=-1.7134788036346436; dx=-6.174848130320663E-9 evalInputDelta=0.16145743429660797
Fitness changed from -1.5520213693380356 to -1.7134788036346436
Iteration 5 complete. Error: -1.7134788036346436 Total: 18.4595; Orientation: 1.0064; Line Search: 13.1949
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/15e44a8b-5dfe-4306-a39d-214f06575046.jpg)
Adding measurement 6fc04390 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.822e+03, gradient 2.749e-04, dot -0.365; [f9dea7be-b07f-4db5-b006-cfbab455a05a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7134788036346436, -0.9853516668081284, -0.6734171509742737, -0.6734167635440826
LBFGS Accumulation History: 3 points
Removed measurement 6fc04390 to history. Total: 3
th(0)=-1.7134788036346436;dx=-7.556010994839834E-8
New Minimum: -1.7134788036346436 > -1.7554845213890076
WOLF (strong): th(1.8144000000000004E7)=-1.7554845213890076; dx=2.4976811139231003E-8 evalInputDelta=0.042005717754364014
New Minimum: -1.7554845213890076 > -1.8424358516931534
WOLF (strong): th(9072000.000000002)=-1.8424358516931534; dx=5.779467717294295E-9 evalInputDelta=0.12895704805850983
END: th(3024000.0000000005)=-1.7980478554964066; dx=-3.794873681008144E-8 evalInputDelta=0.084569051861763
Fitness changed from -1.7134788036346436 to -1.8424358516931534
Iteration 6 complete. Error: -1.8424358516931534 Total: 22.2631; Orientation: 1.1180; Line Search: 16.7423
Adding measurement 9ea9fcd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.881e+03, gradient 2.558e-04, dot -0.324; [f9dea7be-b07f-4db5-b006-cfbab455a05a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8424358516931534, -0.9853516668081284, -0.6734171509742737, -0.6734167635440826
LBFGS Accumulation History: 3 points
Removed measurement 9ea9fcd to history. Total: 3
th(0)=-1.8424358516931534;dx=-6.542475693149119E-8
New Minimum: -1.8424358516931534 > -1.9431096613407135
END: th(6515010.502656418)=-1.9431096613407135; dx=-7.26873831495271E-9 evalInputDelta=0.10067380964756012
Fitness changed from -1.8424358516931534 to -1.9431096613407135
Iteration 7 complete. Error: -1.9431096613407135 Total: 13.6275; Orientation: 1.0463; Line Search: 8.2499
Adding measurement 70345396 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.282e+03, gradient 1.859e-04, dot -0.471; [f9dea7be-b07f-4db5-b006-cfbab455a05a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9431096613407135, -0.9853516668081284, -0.6734171509742737, -0.6734167635440826
LBFGS Accumulation History: 3 points
Removed measurement 70345396 to history. Total: 3
th(0)=-1.9431096613407135;dx=-3.4559745415477934E-8
New Minimum: -1.9431096613407135 > -2.009610988199711
WOLF (strong): th(1.4036164632845048E7)=-2.009610988199711; dx=8.627474161336593E-9 evalInputDelta=0.06650132685899734
New Minimum: -2.009610988199711 > -2.014289990067482
END: th(7018082.316422524)=-2.014289990067482; dx=-7.812120780932393E-9 evalInputDelta=0.0711803287267685
Fitness changed from -1.9431096613407135 to -2.014289990067482
Iteration 8 complete. Error: -2.014289990067482 Total: 18.4474; Orientation: 1.0346; Line Search: 12.6472
Adding measurement 2051b66c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.440e+03, gradient 1.721e-04, dot -0.473; [f9dea7be-b07f-4db5-b006-cfbab455a05a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.014289990067482, -0.9853516668081284, -0.6734171509742737, -0.6734167635440826
LBFGS Accumulation History: 3 points
Removed measurement 2051b66c to history. Total: 3
th(0)=-2.014289990067482;dx=-2.961268019081088E-8
New Minimum: -2.014289990067482 > -2.066475383937359
WOLF (strong): th(1.5120000000000006E7)=-2.066475383937359; dx=3.798703263829378E-9 evalInputDelta=0.05218539386987686
New Minimum: -2.066475383937359 > -2.069333702325821
END: th(7560000.000000003)=-2.069333702325821; dx=-3.81568645748611E-9 evalInputDelta=0.05504371225833893
Fitness changed from -2.014289990067482 to -2.069333702325821
Iteration 9 complete. Error: -2.069333702325821 Total: 18.9986; Orientation: 1.0057; Line Search: 13.8142
Adding measurement 73addc98 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.456e+03, gradient 1.713e-04, dot -0.440; [f9dea7be-b07f-4db5-b006-cfbab455a05a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.069333702325821, -0.9853516668081284, -0.6734171509742737, -0.6734167635440826
LBFGS Accumulation History: 3 points
Removed measurement 73addc98 to history. Total: 3
th(0)=-2.069333702325821;dx=-2.9333193033326836E-8
Armijo: th(1.6287526256641047E7)=-2.0651411190629005; dx=1.6989697798187804E-8 evalInputDelta=-0.00419258326292038
New Minimum: -2.069333702325821 > -2.1139484345912933
WOLF (strong): th(8143763.128320524)=-2.1139484345912933; dx=4.548418147555401E-9 evalInputDelta=0.04461473226547241
END: th(2714587.7094401745)=-2.100256882607937; dx=-1.6317188685971916E-8 evalInputDelta=0.030923180282115936
Fitness changed from -2.069333702325821 to -2.1139484345912933
Iteration 10 complete. Error: -2.1139484345912933 Total: 22.4267; Orientation: 1.0427; Line Search: 17.4657
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ac45573c-4511-4272-863e-e0b7ac7b1656.jpg)
Final threshold in iteration 11: -2.1139484345912933 (> -Infinity) after 211.966s (< 5400.000s)
Returns
-2.1139484345912933