BasicOptimizer.scala:89 executed in 7.71 seconds (0.000 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: 160847645681000
Reset training subject: 160847775957800
Adding measurement 31c9f92c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.1969180656619731;dx=-1.747777983626107E-4
New Minimum: -1.1969180656619731 > -1.1972863013988457
WOLFE (weak): th(2.154434690031884)=-1.1972863013988457; dx=-1.724545734959299E-4 evalInputDelta=3.68235736872613E-4
New Minimum: -1.1972863013988457 > -1.1976568267184189
WOLFE (weak): th(4.308869380063768)=-1.1976568267184189; dx=-1.7485386083928726E-4 evalInputDelta=7.387610564457692E-4
New Minimum: -1.1976568267184189 > -1.19913259072439
WOLFE (weak): th(12.926608140191302)=-1.19913259072439; dx=-1.7580807030244424E-4 evalInputDelta=0.0022145250624168167
New Minimum: -1.19913259072439 > -1.2058160272729537
WOLFE (weak): th(51.70643256076521)=-1.2058160272729537; dx=-1.731870998614865E-4 evalInputDelta=0.008897961610980554
New Minimum: -1.2058160272729537 > -1.2419999941527442
WOLFE (weak): th(258.53216280382605)=-1.2419999941527442; dx=-1.7565556121548124E-4 evalInputDelta=0.045081928490771084
New Minimum: -1.2419999941527442 > -1.4577107185388942
WOLFE (weak): th(1551.1929768229563)=-1.4577107185388942; dx=-1.6921186613701603E-4 evalInputDelta=0.2607926528769211
New Minimum: -1.4577107185388942 > -2.364093458907798
END: th(10858.350837760694)=-2.364093458907798; dx=-4.994025330697575E-5 evalInputDelta=1.1671753932458249
Fitness changed from -1.1969180656619731 to -2.364093458907798
Iteration 1 complete. Error: -2.364093458907798 Total: 1.2471; Orientation: 0.0015; Line Search: 0.8960
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7c876ab9-5fd0-4f12-bdbf-3f311bec2ab9.jpg)
Adding measurement 30618993 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2.364093458907798;dx=-1.441424545044808E-4
New Minimum: -2.364093458907798 > -2.612129007097827
WOLF (strong): th(23393.607721408407)=-2.612129007097827; dx=1.1852616048506192E-5 evalInputDelta=0.24803554819002915
New Minimum: -2.612129007097827 > -2.9851333676012684
END: th(11696.803860704204)=-2.9851333676012684; dx=-3.859077658779858E-5 evalInputDelta=0.6210399086934704
Fitness changed from -2.364093458907798 to -2.9851333676012684
Iteration 2 complete. Error: -2.9851333676012684 Total: 0.4552; Orientation: 0.0015; Line Search: 0.3358
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/66b4eee5-a3ad-4111-a607-a91eb6e5f3d4.jpg)
Adding measurement 789889a9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2.9851333676012684;dx=-1.3119300072692703E-4
New Minimum: -2.9851333676012684 > -3.945033257412016
WOLF (strong): th(25200.000000000004)=-3.945033257412016; dx=1.8062416063487564E-6 evalInputDelta=0.9598998898107478
END: th(12600.000000000002)=-3.9333244215174106; dx=-4.4180783687092394E-5 evalInputDelta=0.9481910539161422
Fitness changed from -2.9851333676012684 to -3.945033257412016
Iteration 3 complete. Error: -3.945033257412016 Total: 0.4613; Orientation: 0.0014; Line Search: 0.3414
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/789b6a91-fe50-4b40-ad05-354dc5503e37.jpg)
Adding measurement 1d63ad9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.851e+02, gradient 1.520e-02, dot -0.383; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.945033257412016, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 1d63ad9 to history. Total: 3
th(0)=-3.945033257412016;dx=-2.241791222770385E-4
New Minimum: -3.945033257412016 > -4.311971097114532
WOLF (strong): th(27145.87709440174)=-4.311971097114532; dx=2.0463406269939366E-5 evalInputDelta=0.36693783970251603
New Minimum: -4.311971097114532 > -5.013330297061393
END: th(13572.93854720087)=-5.013330297061393; dx=-3.6428827098741775E-5 evalInputDelta=1.068297039649377
Fitness changed from -3.945033257412016 to -5.013330297061393
Iteration 4 complete. Error: -5.013330297061393 Total: 0.4894; Orientation: 0.0279; Line Search: 0.3416
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/3283c8c0-9847-4a9f-a73d-2ea38c840889.jpg)
Adding measurement 69ea0b32 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.616e+02, gradient 1.115e-02, dot -0.377; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.013330297061393, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 69ea0b32 to history. Total: 3
th(0)=-5.013330297061393;dx=-1.1955936300701389E-4
New Minimum: -5.013330297061393 > -5.478367968001144
END: th(29242.009651760516)=-5.478367968001144; dx=-8.59232009691643E-6 evalInputDelta=0.46503767093975057
Fitness changed from -5.013330297061393 to -5.478367968001144
Iteration 5 complete. Error: -5.478367968001144 Total: 0.3701; Orientation: 0.0288; Line Search: 0.2210
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7e0b0ae1-4413-4959-8af1-3da777a5d5fd.jpg)
Adding measurement 1a99421b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.154e+03, gradient 1.250e-02, dot -0.329; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.478367968001144, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 1a99421b to history. Total: 3
th(0)=-5.478367968001144;dx=-1.5064306461162164E-4
Armijo: th(63000.00000000002)=-5.357643728400315; dx=2.2284576894556755E-5 evalInputDelta=-0.12072423960082901
New Minimum: -5.478367968001144 > -6.894739471790104
WOLF (strong): th(31500.00000000001)=-6.894739471790104; dx=1.2851466610481268E-5 evalInputDelta=1.4163715037889606
END: th(10500.000000000004)=-6.659133666590111; dx=-7.807991821757098E-5 evalInputDelta=1.1807656985889672
Fitness changed from -5.478367968001144 to -6.894739471790104
Iteration 6 complete. Error: -6.894739471790104 Total: 0.6028; Orientation: 0.0272; Line Search: 0.4539
Adding measurement 4fb90aad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.056e+03, gradient 1.296e-02, dot -0.259; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.894739471790104, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 4fb90aad to history. Total: 3
th(0)=-6.894739471790104;dx=-1.584061621681783E-4
New Minimum: -6.894739471790104 > -8.002910028138226
END: th(22621.564245334786)=-8.002910028138226; dx=-2.516707960418551E-7 evalInputDelta=1.1081705563481217
Fitness changed from -6.894739471790104 to -8.002910028138226
Iteration 7 complete. Error: -8.002910028138226 Total: 0.3575; Orientation: 0.0281; Line Search: 0.2228
Adding measurement 1c849eac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.482e+03, gradient 1.234e-02, dot -0.302; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.002910028138226, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 1c849eac to history. Total: 3
th(0)=-8.002910028138226;dx=-1.467083338867525E-4
Armijo: th(48736.6827529342)=-7.949130134188778; dx=2.7090113967925334E-5 evalInputDelta=-0.053779893949448265
New Minimum: -8.002910028138226 > -9.54620750060909
END: th(24368.3413764671)=-9.54620750060909; dx=-8.47591951608688E-6 evalInputDelta=1.5432974724708632
Fitness changed from -8.002910028138226 to -9.54620750060909
Iteration 8 complete. Error: -9.54620750060909 Total: 0.4768; Orientation: 0.0269; Line Search: 0.3386
Adding measurement c22eb5a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.518e+03, gradient 1.220e-02, dot -0.310; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.54620750060909, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement c22eb5a to history. Total: 3
th(0)=-9.54620750060909;dx=-1.4242242396032254E-4
Armijo: th(52500.00000000002)=-8.454829290401424; dx=2.2138443527028903E-5 evalInputDelta=-1.0913782102076652
New Minimum: -9.54620750060909 > -10.245662359699597
END: th(26250.00000000001)=-10.245662359699597; dx=-1.1787443869389568E-5 evalInputDelta=0.6994548590905083
Fitness changed from -9.54620750060909 to -10.245662359699597
Iteration 9 complete. Error: -10.245662359699597 Total: 0.4722; Orientation: 0.0266; Line Search: 0.3353
Adding measurement 2721898e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.600e+03, gradient 1.126e-02, dot -0.292; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.245662359699597, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 2721898e to history. Total: 3
th(0)=-10.245662359699597;dx=-1.2159292702565352E-4
Armijo: th(56553.91061333697)=-9.62800719604017; dx=3.178935080128082E-5 evalInputDelta=-0.6176551636594283
New Minimum: -10.245662359699597 > -11.49715624277304
END: th(28276.955306668486)=-11.49715624277304; dx=-1.2210326742703975E-5 evalInputDelta=1.251493883073442
Fitness changed from -10.245662359699597 to -11.49715624277304
Iteration 10 complete. Error: -11.49715624277304 Total: 0.4764; Orientation: 0.0272; Line Search: 0.3414
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/22d5747c-56e6-49a1-b4bf-58efa636082f.jpg)
Adding measurement 4b45d685 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.022e+03, gradient 1.132e-02, dot -0.325; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.49715624277304, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 4b45d685 to history. Total: 3
th(0)=-11.49715624277304;dx=-1.2123520140188893E-4
Armijo: th(60920.853441167754)=-9.77850077927948; dx=2.919619785356218E-5 evalInputDelta=-1.71865546349356
New Minimum: -11.49715624277304 > -12.225858320101064
END: th(30460.426720583877)=-12.225858320101064; dx=-7.125982320421361E-6 evalInputDelta=0.728702077328025
Fitness changed from -11.49715624277304 to -12.225858320101064
Iteration 11 complete. Error: -12.225858320101064 Total: 0.4895; Orientation: 0.0267; Line Search: 0.3424
Adding measurement 499e838f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.316e+03, gradient 1.185e-02, dot -0.275; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.225858320101064, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 499e838f to history. Total: 3
th(0)=-12.225858320101064;dx=-1.3155191556049156E-4
Armijo: th(65625.00000000003)=-10.624250440432398; dx=2.9653449810247313E-5 evalInputDelta=-1.6016078796686664
New Minimum: -12.225858320101064 > -13.027221391654384
END: th(32812.500000000015)=-13.027221391654384; dx=-2.683992722983719E-6 evalInputDelta=0.80136307155332
Fitness changed from -12.225858320101064 to -13.027221391654384
Iteration 12 complete. Error: -13.027221391654384 Total: 0.4794; Orientation: 0.0267; Line Search: 0.3401
Adding measurement 45bc225c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.935e+04, gradient 1.289e-02, dot -0.299; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.027221391654384, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 45bc225c to history. Total: 3
th(0)=-13.027221391654384;dx=-1.595005982387106E-4
Armijo: th(70692.38826667122)=-10.215501196209024; dx=3.486282864213324E-5 evalInputDelta=-2.8117201954453606
New Minimum: -13.027221391654384 > -13.468792976910642
WOLF (strong): th(35346.19413333561)=-13.468792976910642; dx=6.481430480714831E-6 evalInputDelta=0.4415715852562574
New Minimum: -13.468792976910642 > -13.954858528454029
END: th(11782.064711111869)=-13.954858528454029; dx=-9.245399675037361E-5 evalInputDelta=0.9276371367996443
Fitness changed from -13.027221391654384 to -13.954858528454029
Iteration 13 complete. Error: -13.954858528454029 Total: 0.5868; Orientation: 0.0273; Line Search: 0.4499
Adding measurement 13f0371b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.743e+06, gradient 1.022e-02, dot -0.364; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.954858528454029, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 13f0371b to history. Total: 3
th(0)=-13.954858528454029;dx=-9.688775920328822E-5
New Minimum: -13.954858528454029 > -14.381603417792597
END: th(25383.688933819896)=-14.381603417792597; dx=-5.6396664281302796E-5 evalInputDelta=0.42674488933856836
Fitness changed from -13.954858528454029 to -14.381603417792597
Iteration 14 complete. Error: -14.381603417792597 Total: 0.3577; Orientation: 0.0279; Line Search: 0.2202
Adding measurement 722428cb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.873e+04, gradient 1.065e-02, dot -0.322; [0e6842ce-ff0e-40d4-b191-123a9c69a3af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.381603417792597, -2.9851333676012684, -2.364093458907798, -1.1969180656619731
LBFGS Accumulation History: 3 points
Removed measurement 722428cb to history. Total: 3
th(0)=-14.381603417792597;dx=-1.0686303982826003E-4
New Minimum: -14.381603417792597 > -14.694948022033318
END: th(54687.50000000003)=-14.694948022033318; dx=-1.690600537026303E-5 evalInputDelta=0.3133446042407204
Fitness changed from -14.381603417792597 to -14.694948022033318
Iteration 15 complete. Error: -14.694948022033318 Total: 0.3739; Orientation: 0.0310; Line Search: 0.2295
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/bb548068-2193-4112-8b30-353eb426b501.jpg)
Final threshold in iteration 16: -14.694948022033318 (> -Infinity) after 7.706s (< 5400.000s)
Returns
-14.694948022033318