BasicOptimizer.scala:89 executed in 46.58 seconds (0.770 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: 217458870559300
Reset training subject: 217459488757000
Adding measurement 7a4a731f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.278050483539149;dx=-8.79464901930355E-4
New Minimum: -13.278050483539149 > -13.279129237703419
WOLFE (weak): th(2.154434690031884)=-13.279129237703419; dx=-8.778539217284018E-4 evalInputDelta=0.0010787541642702791
New Minimum: -13.279129237703419 > -13.280211816577932
WOLFE (weak): th(4.308869380063768)=-13.280211816577932; dx=-8.786371115956044E-4 evalInputDelta=0.0021613330387832974
New Minimum: -13.280211816577932 > -13.284531703977608
WOLFE (weak): th(12.926608140191302)=-13.284531703977608; dx=-8.785144299797152E-4 evalInputDelta=0.006481220438459445
New Minimum: -13.284531703977608 > -13.303951126197047
WOLFE (weak): th(51.70643256076521)=-13.303951126197047; dx=-8.795221376214717E-4 evalInputDelta=0.025900642657898487
New Minimum: -13.303951126197047 > -13.408019971379158
WOLFE (weak): th(258.53216280382605)=-13.408019971379158; dx=-8.787944550629309E-4 evalInputDelta=0.12996948784000928
New Minimum: -13.408019971379158 > -14.06893655776358
WOLFE (weak): th(1551.1929768229563)=-14.06893655776358; dx=-8.685863510331902E-4 evalInputDelta=0.7908860742244315
New Minimum: -14.06893655776358 > -18.233201180871696
END: th(10858.350837760694)=-18.233201180871696; dx=-6.220438909202955E-4 evalInputDelta=4.955150697332547
Fitness changed from -13.278050483539149 to -18.233201180871696
Iteration 1 complete. Error: -18.233201180871696 Total: 6.8289; Orientation: 0.0156; Line Search: 5.0658
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8a03da30-c6b0-4f54-98ec-e135cbb3e797.jpg)
Adding measurement 45e7b668 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-18.233201180871696;dx=-9.849129350980156E-4
New Minimum: -18.233201180871696 > -27.43693025784388
END: th(23393.607721408407)=-27.43693025784388; dx=-4.850656683491407E-4 evalInputDelta=9.203729076972184
Fitness changed from -18.233201180871696 to -27.43693025784388
Iteration 2 complete. Error: -27.43693025784388 Total: 1.7947; Orientation: 0.0163; Line Search: 1.1847
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d7d7d0d7-4bda-43ec-9549-2ecff0ed2d57.jpg)
Adding measurement 7208783c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-27.43693025784388;dx=-0.0012300609504978482
New Minimum: -27.43693025784388 > -39.34551458536448
END: th(50400.00000000001)=-39.34551458536448; dx=-2.6888365185104616E-4 evalInputDelta=11.908584327520597
Fitness changed from -27.43693025784388 to -39.34551458536448
Iteration 3 complete. Error: -39.34551458536448 Total: 1.7808; Orientation: 0.0160; Line Search: 1.2066
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c25026d0-db8c-4f6d-b84e-efc4b608856b.jpg)
Adding measurement 5bd8973b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.272e+03, gradient 3.847e-02, dot -0.207; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.34551458536448, -27.43693025784388, -18.233201180871696, -13.278050483539149
LBFGS Accumulation History: 3 points
Removed measurement 5bd8973b to history. Total: 3
th(0)=-39.34551458536448;dx=-0.0014791824592943056
New Minimum: -39.34551458536448 > -46.991837686236394
END: th(108583.50837760697)=-46.991837686236394; dx=-9.570403627275335E-5 evalInputDelta=7.646323100871918
Fitness changed from -39.34551458536448 to -46.991837686236394
Iteration 4 complete. Error: -46.991837686236394 Total: 2.0981; Orientation: 0.3005; Line Search: 1.2265
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/05d2adf7-7210-47a7-8517-a3b3c2611008.jpg)
Adding measurement 4c21d8e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.795e+03, gradient 3.754e-02, dot -0.115; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.991837686236394, -27.43693025784388, -18.233201180871696, -13.278050483539149
LBFGS Accumulation History: 3 points
Removed measurement 4c21d8e to history. Total: 3
th(0)=-46.991837686236394;dx=-0.001408678932456436
Armijo: th(233936.07721408413)=-35.86044274921908; dx=-3.778001010558189E-6 evalInputDelta=-11.131394937017312
New Minimum: -46.991837686236394 > -60.84542999185348
END: th(116968.03860704206)=-60.84542999185348; dx=-1.6772499552532356E-4 evalInputDelta=13.853592305617084
Fitness changed from -46.991837686236394 to -60.84542999185348
Iteration 5 complete. Error: -60.84542999185348 Total: 2.6704; Orientation: 0.3003; Line Search: 1.8117
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/70cf7dc7-7a31-40f6-b88e-f718047640d8.jpg)
Adding measurement 3dfa7fa5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.413e+03, gradient 3.703e-02, dot -0.109; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.84542999185348, -27.43693025784388, -18.233201180871696, -13.278050483539149
LBFGS Accumulation History: 3 points
Removed measurement 3dfa7fa5 to history. Total: 3
th(0)=-60.84542999185348;dx=-0.0013700388987650238
Armijo: th(252000.0000000001)=-42.851322979807534; dx=-1.029898261478923E-5 evalInputDelta=-17.994107012045944
New Minimum: -60.84542999185348 > -79.42164999817528
END: th(126000.00000000004)=-79.42164999817528; dx=-2.3820263969447067E-4 evalInputDelta=18.576220006321805
Fitness changed from -60.84542999185348 to -79.42164999817528
Iteration 6 complete. Error: -79.42164999817528 Total: 2.9613; Orientation: 0.2911; Line Search: 2.0988
Adding measurement 4228b0c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.381e+04, gradient 3.606e-02, dot -0.124; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.42164999817528, -27.43693025784388, -18.233201180871696, -13.278050483539149
LBFGS Accumulation History: 3 points
Removed measurement 4228b0c1 to history. Total: 3
th(0)=-79.42164999817528;dx=-0.0012992269620401061
Armijo: th(271458.77094401745)=-53.70405660738611; dx=-1.6987705182523623E-5 evalInputDelta=-25.717593390789176
New Minimum: -79.42164999817528 > -97.87016994343232
END: th(135729.38547200873)=-97.87016994343232; dx=-2.658359998324351E-4 evalInputDelta=18.448519945257033
Fitness changed from -79.42164999817528 to -97.87016994343232
Iteration 7 complete. Error: -97.87016994343232 Total: 2.6856; Orientation: 0.2828; Line Search: 1.8666
Adding measurement 41c1d838 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.608e+04, gradient 3.538e-02, dot -0.134; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.87016994343232, -27.43693025784388, -18.233201180871696, -13.278050483539149
LBFGS Accumulation History: 3 points
Removed measurement 41c1d838 to history. Total: 3
th(0)=-97.87016994343232;dx=-0.0012503991682908052
Armijo: th(292420.0965176052)=-60.585760675552706; dx=-7.3930890829734115E-6 evalInputDelta=-37.28440926787961
New Minimum: -97.87016994343232 > -111.49404155234535
END: th(146210.0482588026)=-111.49404155234535; dx=-2.4947016375649226E-4 evalInputDelta=13.623871608913035
Fitness changed from -97.87016994343232 to -111.49404155234535
Iteration 8 complete. Error: -111.49404155234535 Total: 2.6776; Orientation: 0.2930; Line Search: 1.8325
Adding measurement b80036c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.584e+04, gradient 3.551e-02, dot -0.150; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.49404155234535, -27.43693025784388, -18.233201180871696, -13.278050483539149
LBFGS Accumulation History: 3 points
Removed measurement b80036c to history. Total: 3
th(0)=-111.49404155234535;dx=-0.0012604984277656015
Armijo: th(315000.0000000001)=-69.06295825001247; dx=-9.529101807174458E-6 evalInputDelta=-42.43108330233288
New Minimum: -111.49404155234535 > -125.6209508380569
END: th(157500.00000000006)=-125.6209508380569; dx=-2.4401665662911865E-4 evalInputDelta=14.126909285711548
Fitness changed from -111.49404155234535 to -125.6209508380569
Iteration 9 complete. Error: -125.6209508380569 Total: 2.6774; Orientation: 0.3012; Line Search: 1.8160
Adding measurement 4ffd9e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.756e+05, gradient 3.588e-02, dot -0.147; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -125.6209508380569, -27.43693025784388, -18.233201180871696, -13.278050483539149
LBFGS Accumulation History: 3 points
Removed measurement 4ffd9e5 to history. Total: 3
th(0)=-125.6209508380569;dx=-0.0012860425178834916
Armijo: th(339323.4636800218)=-74.23743019785282; dx=-6.4783182081225E-6 evalInputDelta=-51.38352064020408
New Minimum: -125.6209508380569 > -137.63855684702003
END: th(169661.7318400109)=-137.63855684702003; dx=-2.3702162453667224E-4 evalInputDelta=12.017606008963128
Fitness changed from -125.6209508380569 to -137.63855684702003
Iteration 10 complete. Error: -137.63855684702003 Total: 2.8825; Orientation: 0.2911; Line Search: 2.0211
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0df18699-8069-4184-a39c-4bb1632e5015.jpg)
Adding measurement 4770a6c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.871e+04, gradient 3.614e-02, dot -0.129; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -137.63855684702003, -27.43693025784388, -18.233201180871696, -13.278050483539149
LBFGS Accumulation History: 3 points
Removed measurement 4770a6c4 to history. Total: 3
th(0)=-137.63855684702003;dx=-0.001304877757876705
Armijo: th(365525.1206470065)=-71.60444771249185; dx=2.4021346217449975E-5 evalInputDelta=-66.03410913452818
New Minimum: -137.63855684702003 > -145.65382801754072
END: th(182762.56032350325)=-145.65382801754072; dx=-2.1075930561153806E-4 evalInputDelta=8.015271170520691
Fitness changed from -137.63855684702003 to -145.65382801754072
Iteration 11 complete. Error: -145.65382801754072 Total: 2.6687; Orientation: 0.2779; Line Search: 1.7918
Adding measurement 7b40fd3a to history. Total: 3
Accepted: LBFGS Orientation magnitude: 4.108e+04, gradient 3.627e-02, dot 0.178; [5f977f81-4746-40dd-b4a5-f7f0382f8caf = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-145.65382801754072;dx=-266.2461791928577
Armijo: th(393750.0000000002)=758.9765124586017; dx=0.0010355153116270658 evalInputDelta=-904.6303404761425
Armijo: th(196875.0000000001)=758.9366393133606; dx=0.0020708461814372145 evalInputDelta=-904.5904673309013
Armijo: th(65625.00000000003)=758.729512623748; dx=0.006211407359142593 evalInputDelta=-904.3833406412887
Armijo: th(16406.250000000007)=757.6916249806195; dx=0.024789509819572744 evalInputDelta=-903.3454529981602
Armijo: th(3281.2500000000014)=754.2718418343438; dx=0.12287464396420716 evalInputDelta=-899.9256698518845
Armijo: th(546.8750000000002)=743.9981311684678; dx=0.723060023369726 evalInputDelta=-889.6519591860085
Armijo: th(78.12500000000003)=692.3679586088998; dx=4.62181501509283 evalInputDelta=-838.0217866264405
Armijo: th(9.765625000000004)=510.72124350549893; dx=28.089398673700163 evalInputDelta=-656.3750715230397
Armijo: th(1.0850694444444449)=81.96297970787997; dx=79.6574520660746 evalInputDelta=-227.6168077254207
Armijo: th(0.10850694444444449)=-130.11803666786645; dx=-24.984537127785572 evalInputDelta=-15.53579134967427
Armijo: th(0.009864267676767681)=-144.97901590188607; dx=-115.63495069778212 evalInputDelta=-0.674812115654646
Armijo: th(8.220223063973068E-4)=-145.60669794869784; dx=-126.66368475294757 evalInputDelta=-0.04713006884287552
Armijo: th(6.323248510748514E-5)=-145.65027212318813; dx=-127.83496045481724 evalInputDelta=-0.0035558943525870745
Armijo: th(4.516606079106081E-6)=-145.65357816477837; dx=-128.04873811890647 evalInputDelta=-2.498527623515656E-4
Armijo: th(3.011070719404054E-7)=-145.65381065566004; dx=-128.06147731513008 evalInputDelta=-1.736188067980038E-5
Armijo: th(1.8819191996275338E-8)=-145.65382801754072; dx=-127.98938278835742 evalInputDelta=0.0
Armijo: th(1.1070112938985492E-9)=-145.65382801754072; dx=-127.93027675099233 evalInputDelta=0.0
MIN ALPHA (6.150062743880829E-11): th(0.0)=-145.65382801754072
Fitness changed from -145.65382801754072 to -145.65382801754072
Static Iteration Total: 12.5889; Orientation: 0.2856; Line Search: 11.7670
Iteration 12 failed. Error: -145.65382801754072
Previous Error: 0.0 -> -145.65382801754072
Retrying iteration 12
Reset training subject: 217503185586800
Adding measurement 7250f01c to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-145.65382801754072;dx=-0.0013146729985954063
END: th(2.1544346900318838E-10)=-145.65382801754072; dx=-0.0010871821275888292 evalInputDelta=0.0
Fitness changed from -145.65382801754072 to -145.65382801754072
Static Iteration Total: 2.2677; Orientation: 0.0151; Line Search: 1.1631
Iteration 13 failed. Error: -145.65382801754072
Previous Error: 0.0 -> -145.65382801754072
Optimization terminated 13
Final threshold in iteration 13: -145.65382801754072 (> -Infinity) after 46.583s (< 5400.000s)
Returns
-145.65382801754072