BasicOptimizer.scala:89 executed in 49.40 seconds (1.008 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: 213691513979800
Reset training subject: 213692176510400
Adding measurement d990b62 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-86.54110393382129;dx=-0.037735283828796484
New Minimum: -86.54110393382129 > -86.59295173233554
WOLFE (weak): th(2.154434690031884)=-86.59295173233554; dx=-0.037727796058531674 evalInputDelta=0.05184779851424537
New Minimum: -86.59295173233554 > -86.64475278172448
WOLFE (weak): th(4.308869380063768)=-86.64475278172448; dx=-0.03773099652249421 evalInputDelta=0.1036488479031874
New Minimum: -86.64475278172448 > -86.85168752374899
WOLFE (weak): th(12.926608140191302)=-86.85168752374899; dx=-0.0376559739837902 evalInputDelta=0.3105835899277025
New Minimum: -86.85168752374899 > -87.78551245909324
WOLFE (weak): th(51.70643256076521)=-87.78551245909324; dx=-0.03762709172670371 evalInputDelta=1.2444085252719503
New Minimum: -87.78551245909324 > -92.74939984316964
WOLFE (weak): th(258.53216280382605)=-92.74939984316964; dx=-0.03667799366531317 evalInputDelta=6.208295909348351
New Minimum: -92.74939984316964 > -120.78013402177405
END: th(1551.1929768229563)=-120.78013402177405; dx=-0.02940524774648745 evalInputDelta=34.239030087952756
Fitness changed from -86.54110393382129 to -120.78013402177405
Iteration 1 complete. Error: -120.78013402177405 Total: 6.4228; Orientation: 0.0155; Line Search: 4.6099
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0ee60af2-9da4-4592-a455-b1b4da0e5a16.jpg)
Adding measurement 8504361 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-120.78013402177405;dx=-0.03739917529204054
New Minimum: -120.78013402177405 > -181.20392681498157
END: th(3341.943960201201)=-181.20392681498157; dx=-0.02113051550484509 evalInputDelta=60.423792793207525
Fitness changed from -120.78013402177405 to -181.20392681498157
Iteration 2 complete. Error: -181.20392681498157 Total: 1.8603; Orientation: 0.0159; Line Search: 1.2046
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6a79fc5b-085a-431f-9d0f-a488e81a053b.jpg)
Adding measurement 3238901d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-181.20392681498157;dx=-0.04035940583313845
New Minimum: -181.20392681498157 > -262.5494944613036
END: th(7200.000000000001)=-262.5494944613036; dx=-0.013056440848368385 evalInputDelta=81.34556764632202
Fitness changed from -181.20392681498157 to -262.5494944613036
Iteration 3 complete. Error: -262.5494944613036 Total: 1.8224; Orientation: 0.0160; Line Search: 1.2057
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/de4c5e53-4fb8-41da-935f-77cf4d0afa95.jpg)
Adding measurement 3c5e99d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.953e+03, gradient 2.219e-01, dot -0.267; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -262.5494944613036, -181.20392681498157, -120.78013402177405, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 3c5e99d2 to history. Total: 3
th(0)=-262.5494944613036;dx=-0.0492391900891221
New Minimum: -262.5494944613036 > -279.8415463738237
END: th(15511.929768229566)=-279.8415463738237; dx=-0.0037427581014909507 evalInputDelta=17.292051912520094
Fitness changed from -262.5494944613036 to -279.8415463738237
Iteration 4 complete. Error: -279.8415463738237 Total: 2.1093; Orientation: 0.2885; Line Search: 1.2393
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/61f78f0a-97fd-4ccd-827b-61cb61738d30.jpg)
Adding measurement 669a75a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.563e+03, gradient 2.528e-01, dot -0.138; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -279.8415463738237, -181.20392681498157, -120.78013402177405, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 669a75a to history. Total: 3
th(0)=-279.8415463738237;dx=-0.06392583861198067
Armijo: th(33419.43960201202)=-168.79956412593054; dx=-5.397248454065215E-4 evalInputDelta=-111.04198224789315
New Minimum: -279.8415463738237 > -337.4681567937677
END: th(16709.71980100601)=-337.4681567937677; dx=-0.006122951705812432 evalInputDelta=57.62661041994403
Fitness changed from -279.8415463738237 to -337.4681567937677
Iteration 5 complete. Error: -337.4681567937677 Total: 2.7211; Orientation: 0.3048; Line Search: 1.8278
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a036a1f1-d67e-4f6c-b5dc-d213590dfc06.jpg)
Adding measurement 4eef1403 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.441e+03, gradient 2.440e-01, dot -0.132; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -337.4681567937677, -181.20392681498157, -120.78013402177405, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 4eef1403 to history. Total: 3
th(0)=-337.4681567937677;dx=-0.059558477210513376
Armijo: th(36000.000000000015)=-244.1772681433074; dx=-4.054295904538115E-4 evalInputDelta=-93.29088865046032
New Minimum: -337.4681567937677 > -450.1664501920765
END: th(18000.000000000007)=-450.1664501920765; dx=-0.00910544123161707 evalInputDelta=112.6982933983088
Fitness changed from -337.4681567937677 to -450.1664501920765
Iteration 6 complete. Error: -450.1664501920765 Total: 3.3051; Orientation: 0.2716; Line Search: 1.9293
Adding measurement 198df93b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.521e+04, gradient 2.331e-01, dot -0.136; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -450.1664501920765, -181.20392681498157, -120.78013402177405, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 198df93b to history. Total: 3
th(0)=-450.1664501920765;dx=-0.05434716932431976
Armijo: th(38779.824420573925)=-348.8461401872953; dx=-7.210806213508275E-4 evalInputDelta=-101.32031000478122
New Minimum: -450.1664501920765 > -584.4440141171
END: th(19389.912210286962)=-584.4440141171; dx=-0.010714551911225542 evalInputDelta=134.27756392502346
Fitness changed from -450.1664501920765 to -584.4440141171
Iteration 7 complete. Error: -584.4440141171 Total: 2.8606; Orientation: 0.3037; Line Search: 1.9685
Adding measurement 1b6ef915 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.236e+04, gradient 2.333e-01, dot -0.155; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -584.4440141171, -181.20392681498157, -120.78013402177405, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 1b6ef915 to history. Total: 3
th(0)=-584.4440141171;dx=-0.054413479486173616
Armijo: th(41774.29950251503)=-427.0386198990334; dx=1.1515597199069521E-5 evalInputDelta=-157.4053942180666
New Minimum: -584.4440141171 > -713.646365660028
END: th(20887.149751257515)=-713.646365660028; dx=-0.01070110736039796 evalInputDelta=129.202351542928
Fitness changed from -584.4440141171 to -713.646365660028
Iteration 8 complete. Error: -713.646365660028 Total: 2.7711; Orientation: 0.2974; Line Search: 1.8421
Adding measurement 4997a11f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.544e+05, gradient 2.324e-01, dot -0.155; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -713.646365660028, -181.20392681498157, -120.78013402177405, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 4997a11f to history. Total: 3
th(0)=-713.646365660028;dx=-0.05399283234310427
Armijo: th(45000.00000000002)=-485.8107221862532; dx=9.028771974291364E-5 evalInputDelta=-227.83564347377478
New Minimum: -713.646365660028 > -821.6859007418489
END: th(22500.00000000001)=-821.6859007418489; dx=-0.009513394450227418 evalInputDelta=108.03953508182087
Fitness changed from -713.646365660028 to -821.6859007418489
Iteration 9 complete. Error: -821.6859007418489 Total: 2.9395; Orientation: 0.3341; Line Search: 1.9881
Adding measurement 267694a7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.104e+05, gradient 2.338e-01, dot -0.145; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -821.6859007418489, -181.20392681498157, -120.78013402177405, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 267694a7 to history. Total: 3
th(0)=-821.6859007418489;dx=-0.054660834666546254
Armijo: th(48474.78052571741)=-533.4344336458987; dx=4.358776454549885E-4 evalInputDelta=-288.25146709595015
New Minimum: -821.6859007418489 > -915.6416101347052
END: th(24237.390262858706)=-915.6416101347052; dx=-0.009197614521146608 evalInputDelta=93.9557093928563
Fitness changed from -821.6859007418489 to -915.6416101347052
Iteration 10 complete. Error: -915.6416101347052 Total: 3.1535; Orientation: 0.3003; Line Search: 2.0241
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f118b0d4-dce8-455f-aa0d-edbc878ce033.jpg)
Adding measurement 357ab4a3 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.851e+04, gradient 2.365e-01, dot 0.178; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-915.6416101347052;dx=-1203.5771380732087
Armijo: th(52217.874378143795)=3091.9233529368867; dx=0.0422917945235153 evalInputDelta=-4007.5649630715916
Armijo: th(26108.937189071898)=3054.127282041911; dx=0.08362493298276732 evalInputDelta=-3969.7688921766157
Armijo: th(8702.979063023966)=2980.617325819262; dx=0.24516186271769302 evalInputDelta=-3896.258935953967
Armijo: th(2175.7447657559915)=2842.045079686709; dx=0.940525183229459 evalInputDelta=-3757.686689821414
Armijo: th(435.14895315119827)=2567.688105520492; dx=4.309822966947897 evalInputDelta=-3483.329715655197
Armijo: th(72.52482552519972)=2042.1504522182263; dx=20.89187379849185 evalInputDelta=-2957.7920623529317
Armijo: th(10.360689360742816)=1122.3195686610104; dx=92.48042384232474 evalInputDelta=-2037.9611787957156
Armijo: th(1.295086170092852)=-163.56089367899835; dx=255.8752914128555 evalInputDelta=-752.0807164557068
Armijo: th(0.14389846334365022)=-881.0433322708991; dx=-139.14515231246804 evalInputDelta=-34.59827786380606
New Minimum: -915.6416101347052 > -917.3964233762688
END: th(0.014389846334365023)=-917.3964233762688; dx=-518.5600069111234 evalInputDelta=1.7548132415636246
Fitness changed from -915.6416101347052 to -917.3964233762688
Iteration 11 complete. Error: -917.3964233762688 Total: 8.0697; Orientation: 0.3164; Line Search: 7.1595
Adding measurement 2437564b to history. Total: 4
Rejected: LBFGS Orientation magnitude: 4.638e+05, gradient 2.358e-01, dot -0.147; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -917.3964233762688, -915.6416101347052, -181.20392681498157, -120.78013402177405, -86.54110393382129
Rejected: LBFGS Orientation magnitude: 7.597e+05, gradient 2.358e-01, dot -0.166; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -917.3964233762688, -915.6416101347052, -181.20392681498157, -120.78013402177405
LBFGS Accumulation History: 3 points
Removed measurement 2437564b to history. Total: 4
Removed measurement 357ab4a3 to history. Total: 3
th(0)=-917.3964233762688;dx=-0.055597578668945186
New Minimum: -917.3964233762688 > -917.3972222518685
END: th(0.03100198412698415)=-917.3972222518685; dx=-0.045991241572078276 evalInputDelta=7.98875599684834E-4
Fitness changed from -917.3964233762688 to -917.3972222518685
Iteration 12 complete. Error: -917.3972222518685 Total: 4.0798; Orientation: 1.5290; Line Search: 1.5274
Adding measurement 70b7c1cf to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.485e+04, gradient 2.358e-01, dot 0.185; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
th(0)=-917.3972222518685;dx=-1084.099111465357
Armijo: th(0.06679175006299248)=-912.742342716519; dx=-338.57966062124416 evalInputDelta=-4.654879535349437
New Minimum: -917.3972222518685 > -917.4888766630825
END: th(0.03339587503149624)=-917.4888766630825; dx=-425.488046280451 evalInputDelta=0.09165441121399454
Fitness changed from -917.3972222518685 to -917.4888766630825
Iteration 13 complete. Error: -917.4888766630825 Total: 2.7254; Orientation: 0.3004; Line Search: 1.8497
Adding measurement 1ab46f9b to history. Total: 4
Rejected: LBFGS Orientation magnitude: 5.100e+05, gradient 2.342e-01, dot -0.141; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -917.4888766630825, -917.3972222518685, -181.20392681498157, -120.78013402177405, -86.54110393382129
Rejected: LBFGS Orientation magnitude: 7.980e+05, gradient 2.342e-01, dot -0.161; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -917.4888766630825, -917.3972222518685, -181.20392681498157, -120.78013402177405
LBFGS Accumulation History: 3 points
Removed measurement 1ab46f9b to history. Total: 4
Removed measurement 70b7c1cf to history. Total: 3
th(0)=-917.4888766630825;dx=-0.054862851364871124
New Minimum: -917.4888766630825 > -917.4905250408699
END: th(0.07194923167182514)=-917.4905250408699; dx=-0.044649248061868436 evalInputDelta=0.0016483777874327643
Fitness changed from -917.4888766630825 to -917.4905250408699
Iteration 14 complete. Error: -917.4905250408699 Total: 2.4491; Orientation: 0.6332; Line Search: 1.2725
Adding measurement 7de33dea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.624e+04, gradient 2.342e-01, dot -0.033; [897e45dd-defc-4a34-a9af-06fe412f25aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -917.4905250408699, -181.20392681498157, -120.78013402177405, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 7de33dea to history. Total: 3
th(0)=-917.4905250408699;dx=-0.0548620394035918
New Minimum: -917.4905250408699 > -917.4940776566214
END: th(0.1550099206349208)=-917.4940776566214; dx=-0.04464970880457614 evalInputDelta=0.003552615751459598
Fitness changed from -917.4905250408699 to -917.4940776566214
Iteration 15 complete. Error: -917.4940776566214 Total: 2.0933; Orientation: 0.2863; Line Search: 1.2533
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/8cc8be6d-76ef-4e1e-a3c6-3b6b398797eb.jpg)
Final threshold in iteration 16: -917.4940776566214 (> -Infinity) after 49.404s (< 5400.000s)
Returns
-917.4940776566214