BasicOptimizer.scala:89 executed in 56.22 seconds (1.471 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: 212348123877700
Reset training subject: 212348979679500
Adding measurement 24391b32 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=113.20822926981941;dx=-3.5517368027759345E-4
New Minimum: 113.20822926981941 > 113.20763015458812
WOLFE (weak): th(2.154434690031884)=113.20763015458812; dx=-3.5537061789308574E-4 evalInputDelta=5.991152312958548E-4
New Minimum: 113.20763015458812 > 113.20703154404134
WOLFE (weak): th(4.308869380063768)=113.20703154404134; dx=-3.552732372581519E-4 evalInputDelta=0.0011977257780699802
New Minimum: 113.20703154404134 > 113.20462335430908
WOLFE (weak): th(12.926608140191302)=113.20462335430908; dx=-3.5527005341660033E-4 evalInputDelta=0.003605915510334512
New Minimum: 113.20462335430908 > 113.19378001740151
WOLFE (weak): th(51.70643256076521)=113.19378001740151; dx=-3.562218078860832E-4 evalInputDelta=0.01444925241790429
New Minimum: 113.19378001740151 > 113.1356155611038
WOLFE (weak): th(258.53216280382605)=113.1356155611038; dx=-3.5934697443528796E-4 evalInputDelta=0.07261370871560757
New Minimum: 113.1356155611038 > 112.76820068482839
WOLFE (weak): th(1551.1929768229563)=112.76820068482839; dx=-3.577160796225957E-4 evalInputDelta=0.44002858499102615
New Minimum: 112.76820068482839 > 110.27351151030685
END: th(10858.350837760694)=110.27351151030685; dx=-2.995567690492598E-4 evalInputDelta=2.9347177595125657
Fitness changed from 113.20822926981941 to 110.27351151030685
Iteration 1 complete. Error: 110.27351151030685 Total: 9.1038; Orientation: 0.0159; Line Search: 6.7310
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/460566eb-5e32-498a-bfc4-1ebd239e3a86.jpg)
Adding measurement 4bd08043 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=110.27351151030685;dx=-3.6507925913438954E-4
New Minimum: 110.27351151030685 > 104.63457222011884
END: th(23393.607721408407)=104.63457222011884; dx=-2.4463502003027225E-4 evalInputDelta=5.638939290188006
Fitness changed from 110.27351151030685 to 104.63457222011884
Iteration 2 complete. Error: 104.63457222011884 Total: 2.3718; Orientation: 0.0182; Line Search: 1.5463
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d1258960-6334-45c2-9e09-bd642b498f7d.jpg)
Adding measurement 41aaaabb to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=104.63457222011884;dx=-3.765141420343971E-4
New Minimum: 104.63457222011884 > 95.36867900055242
END: th(50400.00000000001)=95.36867900055242; dx=-1.708806246933784E-4 evalInputDelta=9.265893219566422
Fitness changed from 104.63457222011884 to 95.36867900055242
Iteration 3 complete. Error: 95.36867900055242 Total: 2.8203; Orientation: 0.0188; Line Search: 1.9776
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/919aa94d-20b4-4ebb-a80e-c079d43d6e4d.jpg)
Adding measurement 4fe3a6ad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.531e+04, gradient 2.006e-02, dot -0.449; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 95.36867900055242, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 4fe3a6ad to history. Total: 3
th(0)=95.36867900055242;dx=-4.0204730659879013E-4
New Minimum: 95.36867900055242 > 86.42911812293195
END: th(108583.50837760697)=86.42911812293195; dx=-7.116666050211774E-5 evalInputDelta=8.939560877620465
Fitness changed from 95.36867900055242 to 86.42911812293195
Iteration 4 complete. Error: 86.42911812293195 Total: 2.6869; Orientation: 0.3124; Line Search: 1.5786
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0d4a0f8c-bc2e-4118-bd85-81bd0f53de05.jpg)
Adding measurement 63906778 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.752e+03, gradient 2.053e-02, dot -0.277; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 86.42911812293195, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 63906778 to history. Total: 3
th(0)=86.42911812293195;dx=-4.2074770923287123E-4
Armijo: th(233936.07721408413)=89.16033649113064; dx=4.100944285742818E-5 evalInputDelta=-2.7312183681986824
New Minimum: 86.42911812293195 > 77.57182578902969
END: th(116968.03860704206)=77.57182578902969; dx=-5.014503779331281E-5 evalInputDelta=8.857292333902265
Fitness changed from 86.42911812293195 to 77.57182578902969
Iteration 5 complete. Error: 77.57182578902969 Total: 3.4505; Orientation: 0.3319; Line Search: 2.4186
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/03970d93-26f4-4b9e-9095-f6be71e9f23a.jpg)
Adding measurement 674f0f30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.672e+03, gradient 2.071e-02, dot -0.184; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 77.57182578902969, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 674f0f30 to history. Total: 3
th(0)=77.57182578902969;dx=-4.281392049032168E-4
Armijo: th(252000.0000000001)=89.14888536764943; dx=6.845425136185022E-5 evalInputDelta=-11.577059578619739
New Minimum: 77.57182578902969 > 71.58848844597662
END: th(126000.00000000004)=71.58848844597662; dx=-3.2878909348973535E-5 evalInputDelta=5.983337343053066
Fitness changed from 77.57182578902969 to 71.58848844597662
Iteration 6 complete. Error: 71.58848844597662 Total: 3.7406; Orientation: 0.2992; Line Search: 2.7336
Adding measurement 3da4e9d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.124e+03, gradient 2.036e-02, dot -0.144; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 71.58848844597662, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 3da4e9d2 to history. Total: 3
th(0)=71.58848844597662;dx=-4.1380161465424514E-4
Armijo: th(271458.77094401745)=89.70724083482449; dx=8.090424147718796E-5 evalInputDelta=-18.118752388847867
New Minimum: 71.58848844597662 > 66.94830301234465
END: th(135729.38547200873)=66.94830301234465; dx=-2.549899527796738E-5 evalInputDelta=4.64018543363197
Fitness changed from 71.58848844597662 to 66.94830301234465
Iteration 7 complete. Error: 66.94830301234465 Total: 3.4263; Orientation: 0.3260; Line Search: 2.4138
Adding measurement 751ab1a5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.179e+03, gradient 2.028e-02, dot -0.118; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 66.94830301234465, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 751ab1a5 to history. Total: 3
th(0)=66.94830301234465;dx=-4.1048711038660466E-4
Armijo: th(292420.0965176052)=93.84035421154886; dx=1.0495256127452993E-4 evalInputDelta=-26.892051199204204
New Minimum: 66.94830301234465 > 64.59203649358244
END: th(146210.0482588026)=64.59203649358244; dx=-4.029365377829347E-6 evalInputDelta=2.3562665187622116
Fitness changed from 66.94830301234465 to 64.59203649358244
Iteration 8 complete. Error: 64.59203649358244 Total: 3.6653; Orientation: 0.2946; Line Search: 2.5723
Adding measurement 73ae0026 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.140e+03, gradient 2.082e-02, dot -0.101; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 64.59203649358244, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 73ae0026 to history. Total: 3
th(0)=64.59203649358244;dx=-4.3279921919579464E-4
Armijo: th(315000.0000000001)=103.06560202572827; dx=1.3213633016748204E-4 evalInputDelta=-38.47356553214583
Armijo: th(157500.00000000006)=65.40464036473419; dx=1.2624942204174419E-5 evalInputDelta=-0.8126038711517509
New Minimum: 64.59203649358244 > 54.942394634757804
END: th(52500.00000000002)=54.942394634757804; dx=-2.1635172984841157E-4 evalInputDelta=9.649641858824637
Fitness changed from 64.59203649358244 to 54.942394634757804
Iteration 9 complete. Error: 54.942394634757804 Total: 4.0038; Orientation: 0.2828; Line Search: 2.9497
Adding measurement 784b0d0c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.405e+03, gradient 1.825e-02, dot -0.117; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 54.942394634757804, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 784b0d0c to history. Total: 3
th(0)=54.942394634757804;dx=-3.3283115604663494E-4
New Minimum: 54.942394634757804 > 51.848406061747504
END: th(113107.82122667394)=51.848406061747504; dx=-5.4725914339108985E-5 evalInputDelta=3.0939885730103
Fitness changed from 54.942394634757804 to 51.848406061747504
Iteration 10 complete. Error: 51.848406061747504 Total: 2.9054; Orientation: 0.2974; Line Search: 1.9299
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e3344ab3-ab03-4961-af42-5f2fc6edae52.jpg)
Adding measurement c953c34 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.776e+03, gradient 2.042e-02, dot -0.102; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 51.848406061747504, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement c953c34 to history. Total: 3
th(0)=51.848406061747504;dx=-4.164192156179297E-4
Armijo: th(243683.41376467102)=82.27376340446858; dx=1.0759136660882612E-4 evalInputDelta=-30.425357342721078
Armijo: th(121841.70688233551)=53.52342973530741; dx=-7.03302371772928E-6 evalInputDelta=-1.675023673559906
New Minimum: 51.848406061747504 > 45.154182626249
END: th(40613.90229411184)=45.154182626249; dx=-2.0872465769149374E-4 evalInputDelta=6.6942234354985
Fitness changed from 51.848406061747504 to 45.154182626249
Iteration 11 complete. Error: 45.154182626249 Total: 4.2811; Orientation: 0.3033; Line Search: 3.1838
Adding measurement 5ab98612 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.873e+03, gradient 1.726e-02, dot -0.124; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 45.154182626249, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 5ab98612 to history. Total: 3
th(0)=45.154182626249;dx=-2.9731437407634934E-4
New Minimum: 45.154182626249 > 41.49122027462792
END: th(87500.00000000006)=41.49122027462792; dx=-7.509310047963105E-5 evalInputDelta=3.6629623516210827
Fitness changed from 45.154182626249 to 41.49122027462792
Iteration 12 complete. Error: 41.49122027462792 Total: 2.8976; Orientation: 0.2931; Line Search: 1.8098
Adding measurement 653a586f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.047e+03, gradient 1.901e-02, dot -0.117; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 41.49122027462792, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 653a586f to history. Total: 3
th(0)=41.49122027462792;dx=-3.609841696204485E-4
Armijo: th(188513.03537778996)=60.80490101473784; dx=7.272714623724987E-5 evalInputDelta=-19.313680740109916
New Minimum: 41.49122027462792 > 41.44828289680223
END: th(94256.51768889498)=41.44828289680223; dx=-1.65489348135031E-5 evalInputDelta=0.042937377825687406
Fitness changed from 41.49122027462792 to 41.44828289680223
Iteration 13 complete. Error: 41.44828289680223 Total: 3.5855; Orientation: 0.2933; Line Search: 2.5135
Adding measurement 42cd68e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.220e+03, gradient 2.037e-02, dot -0.102; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 41.44828289680223, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 42cd68e to history. Total: 3
th(0)=41.44828289680223;dx=-4.14256314677513E-4
Armijo: th(203069.51147055923)=66.65479748547095; dx=1.0871229807630074E-4 evalInputDelta=-25.206514588668718
Armijo: th(101534.75573527961)=42.16521498849868; dx=1.2185200425613466E-5 evalInputDelta=-0.7169320916964494
New Minimum: 41.44828289680223 > 35.61984229859154
END: th(33844.918578426536)=35.61984229859154; dx=-2.150092907948563E-4 evalInputDelta=5.82844059821069
Fitness changed from 41.44828289680223 to 35.61984229859154
Iteration 14 complete. Error: 35.61984229859154 Total: 4.6227; Orientation: 0.3055; Line Search: 3.5062
Adding measurement 58aba3d8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.813e+03, gradient 1.652e-02, dot -0.123; [255ff29e-28dc-47c2-9cb9-ec4fc9e1c952 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 35.61984229859154, 104.63457222011884, 110.27351151030685, 113.20822926981941
LBFGS Accumulation History: 3 points
Removed measurement 58aba3d8 to history. Total: 3
th(0)=35.61984229859154;dx=-2.7228790831154264E-4
New Minimum: 35.61984229859154 > 32.59847351098878
END: th(72916.66666666672)=32.59847351098878; dx=-7.862969233632887E-5 evalInputDelta=3.0213687876027606
Fitness changed from 35.61984229859154 to 32.59847351098878
Iteration 15 complete. Error: 32.59847351098878 Total: 2.6314; Orientation: 0.2832; Line Search: 1.6340
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/078e6c9a-8403-475b-a392-49409a6fff4f.jpg)
Final threshold in iteration 16: 32.59847351098878 (> -Infinity) after 56.217s (< 5400.000s)
Returns
32.59847351098878