BasicOptimizer.scala:89 executed in 8.09 seconds (0.584 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: 167099933021800
Reset training subject: 167100061603700
Adding measurement b5bbe85 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-6.269592398942451;dx=-0.13507224763206405
New Minimum: -6.269592398942451 > -6.498344797517432
WOLFE (weak): th(2.154434690031884)=-6.498344797517432; dx=-0.1367171817613515 evalInputDelta=0.2287523985749811
New Minimum: -6.498344797517432 > -6.725173505508926
WOLFE (weak): th(4.308869380063768)=-6.725173505508926; dx=-0.13723009928804544 evalInputDelta=0.4555811065664752
New Minimum: -6.725173505508926 > -7.647022650274965
WOLFE (weak): th(12.926608140191302)=-7.647022650274965; dx=-0.1412142873757168 evalInputDelta=1.3774302513325143
New Minimum: -7.647022650274965 > -12.013712995021889
WOLFE (weak): th(51.70643256076521)=-12.013712995021889; dx=-0.14470609650264782 evalInputDelta=5.744120596079438
New Minimum: -12.013712995021889 > -22.41547505025302
END: th(258.53216280382605)=-22.41547505025302; dx=-0.01881452944788253 evalInputDelta=16.14588265131057
Fitness changed from -6.269592398942451 to -22.41547505025302
Iteration 1 complete. Error: -22.41547505025302 Total: 1.0134; Orientation: 0.0016; Line Search: 0.6678
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a75d1d94-77ad-4d75-8b75-ec1cb6610f21.jpg)
Adding measurement 109f8e44 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-22.41547505025302;dx=-0.17491192564528052
Armijo: th(556.9906600335335)=-18.33610060643262; dx=-0.005554374715737882 evalInputDelta=-4.079374443820399
New Minimum: -22.41547505025302 > -23.40807788673736
WOLF (strong): th(278.49533001676673)=-23.40807788673736; dx=0.022990000032325472 evalInputDelta=0.9926028364843411
New Minimum: -23.40807788673736 > -33.14770374659269
END: th(92.83177667225557)=-33.14770374659269; dx=-0.08155216213739228 evalInputDelta=10.732228696339671
Fitness changed from -22.41547505025302 to -33.14770374659269
Iteration 2 complete. Error: -33.14770374659269 Total: 0.5781; Orientation: 0.0014; Line Search: 0.4422
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c90f9c57-4abe-4843-98da-ee750261cab7.jpg)
Adding measurement 3ddb5ac6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-33.14770374659269;dx=-0.20057265897234972
New Minimum: -33.14770374659269 > -45.03767547192087
WOLF (strong): th(200.0)=-45.03767547192087; dx=0.0014129337188350279 evalInputDelta=11.88997172532818
New Minimum: -45.03767547192087 > -46.240507894188404
END: th(100.0)=-46.240507894188404; dx=-0.07830205428759332 evalInputDelta=13.092804147595714
Fitness changed from -33.14770374659269 to -46.240507894188404
Iteration 3 complete. Error: -46.240507894188404 Total: 0.4539; Orientation: 0.0016; Line Search: 0.3294
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/bd922cda-049e-4eea-883e-a60194a7e963.jpg)
Adding measurement 44757f2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.617e+02, gradient 4.584e-01, dot -0.637; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.240507894188404, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 44757f2 to history. Total: 3
th(0)=-46.240507894188404;dx=-0.20862669683019847
Armijo: th(215.44346900318837)=-45.89796076880077; dx=0.03767044090611843 evalInputDelta=-0.34254712538763243
New Minimum: -46.240507894188404 > -58.34359308026568
END: th(107.72173450159418)=-58.34359308026568; dx=-0.030470141797105013 evalInputDelta=12.103085186077273
Fitness changed from -46.240507894188404 to -58.34359308026568
Iteration 4 complete. Error: -58.34359308026568 Total: 0.4735; Orientation: 0.0278; Line Search: 0.3294
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ea72f462-2a89-4c01-ab76-9d5513f81467.jpg)
Adding measurement 3f2b8f23 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.472e+03, gradient 4.881e-01, dot -0.520; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.34359308026568, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 3f2b8f23 to history. Total: 3
th(0)=-58.34359308026568;dx=-0.22233340609517696
Armijo: th(232.07944168063895)=-38.26777983673488; dx=0.05425095958743585 evalInputDelta=-20.075813243530796
New Minimum: -58.34359308026568 > -65.50014909334176
WOLF (strong): th(116.03972084031948)=-65.50014909334176; dx=0.04922860642460978 evalInputDelta=7.156556013076084
New Minimum: -65.50014909334176 > -69.3222843071584
END: th(38.67990694677316)=-69.3222843071584; dx=-0.11976386258861371 evalInputDelta=10.978691226892721
Fitness changed from -58.34359308026568 to -69.3222843071584
Iteration 5 complete. Error: -69.3222843071584 Total: 0.5806; Orientation: 0.0287; Line Search: 0.4390
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/3c1f2d17-505e-4165-b148-54cde496ed88.jpg)
Adding measurement 3c7a245d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.381e+03, gradient 3.692e-01, dot -0.721; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.3222843071584, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 3c7a245d to history. Total: 3
th(0)=-69.3222843071584;dx=-0.13475586580842253
New Minimum: -69.3222843071584 > -79.84682295945625
END: th(83.33333333333334)=-79.84682295945625; dx=-0.09799167717466638 evalInputDelta=10.52453865229785
Fitness changed from -69.3222843071584 to -79.84682295945625
Iteration 6 complete. Error: -79.84682295945625 Total: 0.3619; Orientation: 0.0263; Line Search: 0.2186
Adding measurement 7a48f80d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.155e+03, gradient 3.533e-01, dot -0.712; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.84682295945625, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 7a48f80d to history. Total: 3
th(0)=-79.84682295945625;dx=-0.12174788136117339
New Minimum: -79.84682295945625 > -98.03450245640562
END: th(179.53622416932367)=-98.03450245640562; dx=-0.06423557560715668 evalInputDelta=18.18767949694937
Fitness changed from -79.84682295945625 to -98.03450245640562
Iteration 7 complete. Error: -98.03450245640562 Total: 0.3516; Orientation: 0.0276; Line Search: 0.2189
Adding measurement 40953bbf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.538e+03, gradient 4.322e-01, dot -0.511; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.03450245640562, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 40953bbf to history. Total: 3
th(0)=-98.03450245640562;dx=-0.18524969898121924
Armijo: th(386.79906946773167)=-59.36583605268585; dx=0.028289532110180735 evalInputDelta=-38.66866640371977
Armijo: th(193.39953473386583)=-97.0084564612797; dx=0.05211033932479836 evalInputDelta=-1.0260459951259122
New Minimum: -98.03450245640562 > -111.36681893353604
END: th(64.46651157795527)=-111.36681893353604; dx=-0.08093485185791893 evalInputDelta=13.33231647713042
Fitness changed from -98.03450245640562 to -111.36681893353604
Iteration 8 complete. Error: -111.36681893353604 Total: 0.5763; Orientation: 0.0270; Line Search: 0.4409
Adding measurement 67c6ee0a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.843e+03, gradient 3.292e-01, dot -0.682; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.36681893353604, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 67c6ee0a to history. Total: 3
th(0)=-111.36681893353604;dx=-0.10608084394187234
New Minimum: -111.36681893353604 > -125.5542050209291
END: th(138.8888888888889)=-125.5542050209291; dx=-0.0707409283992892 evalInputDelta=14.187386087393065
Fitness changed from -111.36681893353604 to -125.5542050209291
Iteration 9 complete. Error: -125.5542050209291 Total: 0.3514; Orientation: 0.0279; Line Search: 0.2188
Adding measurement 2a457aaa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.199e+03, gradient 3.562e-01, dot -0.578; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -125.5542050209291, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 2a457aaa to history. Total: 3
th(0)=-125.5542050209291;dx=-0.1236871040605894
Armijo: th(299.22704028220613)=-124.79241356899465; dx=5.09781653538485E-4 evalInputDelta=-0.7617914519344566
New Minimum: -125.5542050209291 > -138.18479333622423
END: th(149.61352014110307)=-138.18479333622423; dx=-0.03687586073036081 evalInputDelta=12.630588315295128
Fitness changed from -125.5542050209291 to -138.18479333622423
Iteration 10 complete. Error: -138.18479333622423 Total: 0.4674; Orientation: 0.0265; Line Search: 0.3309
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a7442de0-9df6-4b1d-bf43-6af4fbf4aad7.jpg)
Adding measurement 201bacd8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.936e+03, gradient 4.342e-01, dot -0.504; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -138.18479333622423, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 201bacd8 to history. Total: 3
th(0)=-138.18479333622423;dx=-0.1852850055169072
Armijo: th(322.3325578897764)=-83.06160940549641; dx=0.0661303467641167 evalInputDelta=-55.12318393072782
Armijo: th(161.1662789448882)=-138.1563312881462; dx=0.058683012844391584 evalInputDelta=-0.028462048078040425
New Minimum: -138.18479333622423 > -151.63062257711996
END: th(53.7220929816294)=-151.63062257711996; dx=-0.0873375685398289 evalInputDelta=13.445829240895733
Fitness changed from -138.18479333622423 to -151.63062257711996
Iteration 11 complete. Error: -151.63062257711996 Total: 0.5827; Orientation: 0.0262; Line Search: 0.4359
Adding measurement 5172bcbe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.351e+03, gradient 3.138e-01, dot -0.664; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -151.63062257711996, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 5172bcbe to history. Total: 3
th(0)=-151.63062257711996;dx=-0.09388769456990924
New Minimum: -151.63062257711996 > -166.32104919777893
END: th(115.74074074074078)=-166.32104919777893; dx=-0.0781846035271756 evalInputDelta=14.690426620658968
Fitness changed from -151.63062257711996 to -166.32104919777893
Iteration 12 complete. Error: -166.32104919777893 Total: 0.3545; Orientation: 0.0286; Line Search: 0.2218
Adding measurement 7f7c21a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.814e+03, gradient 3.230e-01, dot -0.643; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -166.32104919777893, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 7f7c21a4 to history. Total: 3
th(0)=-166.32104919777893;dx=-0.10193954429424021
New Minimum: -166.32104919777893 > -183.78313901851823
END: th(249.35586690183848)=-183.78313901851823; dx=-0.04541980059465371 evalInputDelta=17.462089820739294
Fitness changed from -166.32104919777893 to -183.78313901851823
Iteration 13 complete. Error: -183.78313901851823 Total: 0.9872; Orientation: 0.6171; Line Search: 0.2643
Adding measurement 1f3feddb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.819e+03, gradient 4.521e-01, dot -0.420; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -183.78313901851823, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 1f3feddb to history. Total: 3
th(0)=-183.78313901851823;dx=-0.20253552638484626
Armijo: th(537.2209298162941)=-92.07777368208899; dx=0.029010873684341687 evalInputDelta=-91.70536533642924
Armijo: th(268.61046490814704)=-155.30018185557608; dx=0.05900507020696036 evalInputDelta=-28.482957162942142
New Minimum: -183.78313901851823 > -201.64238726951731
END: th(89.53682163604901)=-201.64238726951731; dx=-0.04486853738361042 evalInputDelta=17.859248250999087
Fitness changed from -183.78313901851823 to -201.64238726951731
Iteration 14 complete. Error: -201.64238726951731 Total: 0.5841; Orientation: 0.0266; Line Search: 0.4427
Adding measurement 55b53f0d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.640e+03, gradient 3.541e-01, dot -0.583; [cf512ecf-cadf-41a3-ab6f-6328282f7bb5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -201.64238726951731, -33.14770374659269, -22.41547505025302, -6.269592398942451
LBFGS Accumulation History: 3 points
Removed measurement 55b53f0d to history. Total: 3
th(0)=-201.64238726951731;dx=-0.12245187403374251
New Minimum: -201.64238726951731 > -217.36302259986633
END: th(192.90123456790133)=-217.36302259986633; dx=-0.015568817143832283 evalInputDelta=15.720635330349012
Fitness changed from -201.64238726951731 to -217.36302259986633
Iteration 15 complete. Error: -217.36302259986633 Total: 0.3561; Orientation: 0.0280; Line Search: 0.2227
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/1b8498f9-6845-4eb1-bcf7-ca3e91a53dbe.jpg)
Final threshold in iteration 16: -217.36302259986633 (> -Infinity) after 8.087s (< 5400.000s)
Returns
-217.36302259986633