BasicOptimizer.scala:89 executed in 206.65 seconds (2.122 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: 7094265869140
Reset training subject: 7098252703213
Adding measurement 52fade14 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5206822752952576;dx=-5.346831388247898E-7
New Minimum: -0.5206822752952576 > -0.5206826478242874
WOLFE (weak): th(2.154434690031884)=-0.5206826478242874; dx=-5.179877395247374E-7 evalInputDelta=3.725290298461914E-7
New Minimum: -0.5206826478242874 > -0.5206831395626068
WOLFE (weak): th(4.308869380063768)=-0.5206831395626068; dx=-5.179844028807546E-7 evalInputDelta=8.642673492431641E-7
New Minimum: -0.5206831395626068 > -0.5206855535507202
WOLFE (weak): th(12.926608140191302)=-0.5206855535507202; dx=-5.179845626810148E-7 evalInputDelta=3.2782554626464844E-6
New Minimum: -0.5206855535507202 > -0.5206955820322037
WOLFE (weak): th(51.70643256076521)=-0.5206955820322037; dx=-5.179812859325316E-7 evalInputDelta=1.3306736946105957E-5
New Minimum: -0.5206955820322037 > -0.5207491964101791
WOLFE (weak): th(258.53216280382605)=-0.5207491964101791; dx=-5.179475710263566E-7 evalInputDelta=6.692111492156982E-5
New Minimum: -0.5207491964101791 > -0.5210839509963989
WOLFE (weak): th(1551.1929768229563)=-0.5210839509963989; dx=-5.177857581368875E-7 evalInputDelta=4.016757011413574E-4
New Minimum: -0.5210839509963989 > -0.5234915316104889
WOLFE (weak): th(10858.350837760694)=-0.5234915316104889; dx=-5.168711145048378E-7 evalInputDelta=0.0028092563152313232
New Minimum: -0.5234915316104889 > -0.5429881066083908
WOLFE (weak): th(86866.80670208555)=-0.5429881066083908; dx=-5.092143724420307E-7 evalInputDelta=0.02230583131313324
New Minimum: -0.5429881066083908 > -0.7068097442388535
END: th(781801.26031877)=-0.7068097442388535; dx=-4.315220216313726E-7 evalInputDelta=0.1861274689435959
Fitness changed from -0.5206822752952576 to -0.7068097442388535
Iteration 1 complete. Error: -0.7068097442388535 Total: 55.5157; Orientation: 0.0438; Line Search: 43.1941
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/16307a49-6c66-46d3-8708-723375a4233b.jpg)
Adding measurement 20313778 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.7068097442388535;dx=-3.8990944369226787E-7
New Minimum: -0.7068097442388535 > -0.9840932935476303
END: th(1684339.7559414052)=-0.9840932935476303; dx=-2.695048236548315E-7 evalInputDelta=0.27728354930877686
Fitness changed from -0.7068097442388535 to -0.9840932935476303
Iteration 2 complete. Error: -0.9840932935476303 Total: 13.1976; Orientation: 0.0441; Line Search: 9.0229
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8a09eb70-23f0-438b-9f75-05023eb0accb.jpg)
Adding measurement 45a66613 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.9840932935476303;dx=-2.2886738446962167E-7
New Minimum: -0.9840932935476303 > -1.303481251001358
END: th(3628800.0)=-1.303481251001358; dx=-1.2873499451768327E-7 evalInputDelta=0.3193879574537277
Fitness changed from -0.9840932935476303 to -1.303481251001358
Iteration 3 complete. Error: -1.303481251001358 Total: 13.1366; Orientation: 0.0463; Line Search: 8.7010
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/450e912e-41b8-4421-a26b-0b920da0ef6e.jpg)
Adding measurement 7cd6b569 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.157e+03, gradient 3.379e-04, dot -0.865; [9f035f03-4652-4eee-8471-9d4bbe3f0ccc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.303481251001358, -0.9840932935476303, -0.7068097442388535, -0.5206822752952576
LBFGS Accumulation History: 3 points
Removed measurement 7cd6b569 to history. Total: 3
th(0)=-1.303481251001358;dx=-1.1420348328409833E-7
New Minimum: -1.303481251001358 > -1.6166812628507614
END: th(7818012.6031877)=-1.6166812628507614; dx=-5.126841026515278E-8 evalInputDelta=0.3132000118494034
Fitness changed from -1.303481251001358 to -1.6166812628507614
Iteration 4 complete. Error: -1.6166812628507614 Total: 14.3141; Orientation: 1.0286; Line Search: 8.8905
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d4dc471c-bbe8-423a-8553-31df221b0643.jpg)
Adding measurement 22c58106 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.407e+03, gradient 2.443e-04, dot -0.719; [9f035f03-4652-4eee-8471-9d4bbe3f0ccc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6166812628507614, -0.9840932935476303, -0.7068097442388535, -0.5206822752952576
LBFGS Accumulation History: 3 points
Removed measurement 22c58106 to history. Total: 3
th(0)=-1.6166812628507614;dx=-5.96955586256248E-8
New Minimum: -1.6166812628507614 > -1.8601230531930923
END: th(1.684339755941405E7)=-1.8601230531930923; dx=-8.722458886775893E-9 evalInputDelta=0.24344179034233093
Fitness changed from -1.6166812628507614 to -1.8601230531930923
Iteration 5 complete. Error: -1.8601230531930923 Total: 14.7821; Orientation: 1.4140; Line Search: 9.1163
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b0478c3b-11ef-4d73-be08-a65aca2fe79d.jpg)
Adding measurement 5e840a33 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.705e+03, gradient 2.359e-04, dot -0.446; [9f035f03-4652-4eee-8471-9d4bbe3f0ccc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8601230531930923, -0.9840932935476303, -0.7068097442388535, -0.5206822752952576
LBFGS Accumulation History: 3 points
Removed measurement 5e840a33 to history. Total: 3
th(0)=-1.8601230531930923;dx=-5.566302765662023E-8
Armijo: th(3.6288E7)=-1.7934038043022156; dx=2.273470569998089E-8 evalInputDelta=-0.06671924889087677
New Minimum: -1.8601230531930923 > -1.9580104053020477
WOLF (strong): th(1.8144E7)=-1.9580104053020477; dx=1.1980646204179892E-8 evalInputDelta=0.09788735210895538
New Minimum: -1.9580104053020477 > -1.9631533920764923
END: th(6048000.0)=-1.9631533920764923; dx=-1.6573755544555415E-8 evalInputDelta=0.10303033888339996
Fitness changed from -1.8601230531930923 to -1.9631533920764923
Iteration 6 complete. Error: -1.9631533920764923 Total: 22.5401; Orientation: 1.0242; Line Search: 17.3899
Adding measurement 1f4fdb17 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.076e+03, gradient 1.621e-04, dot -0.566; [9f035f03-4652-4eee-8471-9d4bbe3f0ccc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9631533920764923, -0.9840932935476303, -0.7068097442388535, -0.5206822752952576
LBFGS Accumulation History: 3 points
Removed measurement 1f4fdb17 to history. Total: 3
th(0)=-1.9631533920764923;dx=-2.628528333867645E-8
New Minimum: -1.9631533920764923 > -2.0654010325670242
END: th(1.3030021005312834E7)=-2.0654010325670242; dx=-6.187190426002562E-9 evalInputDelta=0.10224764049053192
Fitness changed from -1.9631533920764923 to -2.0654010325670242
Iteration 7 complete. Error: -2.0654010325670242 Total: 14.8040; Orientation: 1.0443; Line Search: 8.8593
Adding measurement 64c5d74e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.324e+03, gradient 1.756e-04, dot -0.475; [9f035f03-4652-4eee-8471-9d4bbe3f0ccc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0654010325670242, -0.9840932935476303, -0.7068097442388535, -0.5206822752952576
LBFGS Accumulation History: 3 points
Removed measurement 64c5d74e to history. Total: 3
th(0)=-2.0654010325670242;dx=-3.084044927943407E-8
Armijo: th(2.8072329265690092E7)=-2.062837779521942; dx=1.0260617262293055E-8 evalInputDelta=-0.0025632530450820923
New Minimum: -2.0654010325670242 > -2.120026797056198
WOLF (strong): th(1.4036164632845046E7)=-2.120026797056198; dx=5.012696998664762E-9 evalInputDelta=0.05462576448917389
END: th(4678721.544281682)=-2.1134109422564507; dx=-1.1565679373791061E-8 evalInputDelta=0.04800990968942642
Fitness changed from -2.0654010325670242 to -2.120026797056198
Iteration 8 complete. Error: -2.120026797056198 Total: 22.1060; Orientation: 1.0140; Line Search: 16.9840
Adding measurement 1c3b9a5e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.965e+03, gradient 1.930e-04, dot -0.399; [9f035f03-4652-4eee-8471-9d4bbe3f0ccc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.120026797056198, -0.9840932935476303, -0.7068097442388535, -0.5206822752952576
LBFGS Accumulation History: 3 points
Removed measurement 1c3b9a5e to history. Total: 3
th(0)=-2.120026797056198;dx=-3.724571757945506E-8
New Minimum: -2.120026797056198 > -2.197531707584858
WOLF (strong): th(1.0080000000000002E7)=-2.197531707584858; dx=4.662473421092564E-9 evalInputDelta=0.07750491052865982
END: th(5040000.000000001)=-2.185250371694565; dx=-1.4692056500508842E-8 evalInputDelta=0.0652235746383667
Fitness changed from -2.120026797056198 to -2.197531707584858
Iteration 9 complete. Error: -2.197531707584858 Total: 17.8708; Orientation: 1.0196; Line Search: 12.4573
Adding measurement 34c68721 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.417e+03, gradient 1.576e-04, dot -0.424; [9f035f03-4652-4eee-8471-9d4bbe3f0ccc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.197531707584858, -0.9840932935476303, -0.7068097442388535, -0.5206822752952576
LBFGS Accumulation History: 3 points
Removed measurement 34c68721 to history. Total: 3
th(0)=-2.197531707584858;dx=-2.4836954485144154E-8
New Minimum: -2.197531707584858 > -2.245250664651394
WOLF (strong): th(1.0858350837760696E7)=-2.245250664651394; dx=2.9802983929269192E-9 evalInputDelta=0.04771895706653595
END: th(5429175.418880348)=-2.2403159365057945; dx=-7.691931762992255E-9 evalInputDelta=0.042784228920936584
Fitness changed from -2.197531707584858 to -2.245250664651394
Iteration 10 complete. Error: -2.245250664651394 Total: 18.3072; Orientation: 1.0102; Line Search: 13.2259
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7f99ec7d-21ba-4138-b9ca-bbb01e104b06.jpg)
Final threshold in iteration 11: -2.245250664651394 (> -Infinity) after 206.644s (< 5400.000s)
Returns
-2.245250664651394