BasicOptimizer.scala:89 executed in 43.63 seconds (0.961 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: 214361076305500
Reset training subject: 214361698364500
Adding measurement 42f1524d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-141.84778097929484;dx=-0.11263807573625637
New Minimum: -141.84778097929484 > -142.0069249496709
WOLFE (weak): th(2.154434690031884)=-142.0069249496709; dx=-0.11243755720574664 evalInputDelta=0.15914397037605
New Minimum: -142.0069249496709 > -142.16613761510393
WOLFE (weak): th(4.308869380063768)=-142.16613761510393; dx=-0.11244047538425937 evalInputDelta=0.3183566358090957
New Minimum: -142.16613761510393 > -142.8034244254364
WOLFE (weak): th(12.926608140191302)=-142.8034244254364; dx=-0.11250640763571157 evalInputDelta=0.9556434461415506
New Minimum: -142.8034244254364 > -145.68674257900994
WOLFE (weak): th(51.70643256076521)=-145.68674257900994; dx=-0.11228113018306665 evalInputDelta=3.8389615997151054
New Minimum: -145.68674257900994 > -161.02716016310447
WOLFE (weak): th(258.53216280382605)=-161.02716016310447; dx=-0.11030431455654471 evalInputDelta=19.17937918380963
New Minimum: -161.02716016310447 > -235.2379397198418
END: th(1551.1929768229563)=-235.2379397198418; dx=-0.06729751617763297 evalInputDelta=93.39015874054695
Fitness changed from -141.84778097929484 to -235.2379397198418
Iteration 1 complete. Error: -235.2379397198418 Total: 6.3055; Orientation: 0.0170; Line Search: 4.5467
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f17d38d8-69a2-4611-82b3-7bc3757d6a44.jpg)
Adding measurement 620e3f51 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-235.2379397198418;dx=-0.1322881400522047
New Minimum: -235.2379397198418 > -337.670318254979
END: th(3341.943960201201)=-337.670318254979; dx=-0.028736611439842897 evalInputDelta=102.43237853513722
Fitness changed from -235.2379397198418 to -337.670318254979
Iteration 2 complete. Error: -337.670318254979 Total: 1.9860; Orientation: 0.0190; Line Search: 1.3119
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/35aa3356-d88d-4ffd-b2cf-5f6b4061adc9.jpg)
Adding measurement 396b1958 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-337.670318254979;dx=-0.1569788916886165
Armijo: th(7200.000000000001)=-332.08497135934084; dx=-0.009003959690288358 evalInputDelta=-5.5853468956381676
New Minimum: -337.670318254979 > -422.33006115596186
END: th(3600.0000000000005)=-422.33006115596186; dx=-0.029164640408757984 evalInputDelta=84.65974290098285
Fitness changed from -337.670318254979 to -422.33006115596186
Iteration 3 complete. Error: -422.33006115596186 Total: 2.4649; Orientation: 0.0200; Line Search: 1.8258
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/830c94a4-00cd-466f-b1d1-2e659f94a4eb.jpg)
Adding measurement 7f824067 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.608e+03, gradient 3.738e-01, dot -0.247; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -422.33006115596186, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 7f824067 to history. Total: 3
th(0)=-422.33006115596186;dx=-0.13950175372895496
New Minimum: -422.33006115596186 > -423.2096032305791
END: th(7755.964884114783)=-423.2096032305791; dx=-0.009624201373705501 evalInputDelta=0.879542074617234
Fitness changed from -422.33006115596186 to -423.2096032305791
Iteration 4 complete. Error: -423.2096032305791 Total: 2.1201; Orientation: 0.3057; Line Search: 1.2188
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/33deb680-6fee-4aa6-8e4f-560e7e94859d.jpg)
Adding measurement 1120bcc1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.817e+03, gradient 3.617e-01, dot -0.190; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -423.2096032305791, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 1120bcc1 to history. Total: 3
th(0)=-423.2096032305791;dx=-0.1302573921406289
Armijo: th(16709.71980100601)=-339.32420605808045; dx=-0.0012977088307938559 evalInputDelta=-83.88539717249864
New Minimum: -423.2096032305791 > -531.3888720383293
END: th(8354.859900503005)=-531.3888720383293; dx=-0.01853391662129361 evalInputDelta=108.17926880775019
Fitness changed from -423.2096032305791 to -531.3888720383293
Iteration 5 complete. Error: -531.3888720383293 Total: 3.2372; Orientation: 0.3030; Line Search: 2.3223
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0f2cd84a-a1c2-4f38-99bd-5eea7a7572c3.jpg)
Adding measurement 6f25b5e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.975e+03, gradient 3.311e-01, dot -0.190; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -531.3888720383293, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 6f25b5e8 to history. Total: 3
th(0)=-531.3888720383293;dx=-0.10940303690933363
Armijo: th(18000.000000000007)=-462.76293906352794; dx=-0.0016651705099853709 evalInputDelta=-68.62593297480134
New Minimum: -531.3888720383293 > -670.0812147611954
END: th(9000.000000000004)=-670.0812147611954; dx=-0.022228190394974985 evalInputDelta=138.6923427228661
Fitness changed from -531.3888720383293 to -670.0812147611954
Iteration 6 complete. Error: -670.0812147611954 Total: 2.6560; Orientation: 0.2961; Line Search: 1.7897
Adding measurement 2ce8b03b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.136e+03, gradient 3.258e-01, dot -0.180; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -670.0812147611954, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 2ce8b03b to history. Total: 3
th(0)=-670.0812147611954;dx=-0.10585128299192163
Armijo: th(19389.912210286962)=-547.848888249244; dx=-0.0010088641549349708 evalInputDelta=-122.23232651195133
New Minimum: -670.0812147611954 > -806.8340371624097
END: th(9694.956105143481)=-806.8340371624097; dx=-0.02094451815615901 evalInputDelta=136.7528224012143
Fitness changed from -670.0812147611954 to -806.8340371624097
Iteration 7 complete. Error: -806.8340371624097 Total: 2.6766; Orientation: 0.3070; Line Search: 1.8117
Adding measurement 31714ae9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.026e+04, gradient 3.166e-01, dot -0.190; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -806.8340371624097, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 31714ae9 to history. Total: 3
th(0)=-806.8340371624097;dx=-0.09995409384134306
Armijo: th(20887.149751257515)=-667.6588614862155; dx=-0.0024778547104792733 evalInputDelta=-139.17517567619416
New Minimum: -806.8340371624097 > -936.6241860018832
END: th(10443.574875628758)=-936.6241860018832; dx=-0.02253824493626873 evalInputDelta=129.79014883947355
Fitness changed from -806.8340371624097 to -936.6241860018832
Iteration 8 complete. Error: -936.6241860018832 Total: 2.6593; Orientation: 0.3039; Line Search: 1.7880
Adding measurement 5cc7adbc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.545e+04, gradient 3.196e-01, dot -0.195; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -936.6241860018832, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 5cc7adbc to history. Total: 3
th(0)=-936.6241860018832;dx=-0.10190319608573734
Armijo: th(22500.00000000001)=-739.4370830249735; dx=-8.549433094639763E-4 evalInputDelta=-197.18710297690973
New Minimum: -936.6241860018832 > -1054.161640045083
END: th(11250.000000000005)=-1054.161640045083; dx=-0.019436632888610646 evalInputDelta=117.53745404319977
Fitness changed from -936.6241860018832 to -1054.161640045083
Iteration 9 complete. Error: -1054.161640045083 Total: 2.9664; Orientation: 0.3109; Line Search: 2.0760
Adding measurement 2a834ed8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.440e+04, gradient 3.189e-01, dot -0.193; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1054.161640045083, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 2a834ed8 to history. Total: 3
th(0)=-1054.161640045083;dx=-0.10149525803299203
Armijo: th(24237.390262858706)=-785.7491440666016; dx=-1.4520360419571408E-4 evalInputDelta=-268.4124959784814
New Minimum: -1054.161640045083 > -1153.8733770436431
END: th(12118.695131429353)=-1153.8733770436431; dx=-0.01839581077485996 evalInputDelta=99.71173699856013
Fitness changed from -1054.161640045083 to -1153.8733770436431
Iteration 10 complete. Error: -1153.8733770436431 Total: 2.6737; Orientation: 0.2907; Line Search: 1.8125
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3e9c82c3-334e-421b-8d8f-7d7cef2a9e8d.jpg)
Adding measurement 2e47afd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.605e+04, gradient 3.279e-01, dot -0.196; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1153.8733770436431, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 2e47afd to history. Total: 3
th(0)=-1153.8733770436431;dx=-0.10734172154975208
Armijo: th(26108.937189071898)=-826.6739842014622; dx=9.464496331399353E-4 evalInputDelta=-327.19939284218094
New Minimum: -1153.8733770436431 > -1239.0795875054112
END: th(13054.468594535949)=-1239.0795875054112; dx=-0.01587460188256764 evalInputDelta=85.20621046176802
Fitness changed from -1153.8733770436431 to -1239.0795875054112
Iteration 11 complete. Error: -1239.0795875054112 Total: 2.6878; Orientation: 0.2987; Line Search: 1.8150
Adding measurement 75c2692b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.428e+04, gradient 3.286e-01, dot -0.187; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1239.0795875054112, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 75c2692b to history. Total: 3
th(0)=-1239.0795875054112;dx=-0.10775892060224844
Armijo: th(28125.00000000002)=-863.7613647718217; dx=0.0032214197658077394 evalInputDelta=-375.31822273358944
New Minimum: -1239.0795875054112 > -1326.7867171604594
END: th(14062.50000000001)=-1326.7867171604594; dx=-0.012816879653882611 evalInputDelta=87.70712965504822
Fitness changed from -1239.0795875054112 to -1326.7867171604594
Iteration 12 complete. Error: -1326.7867171604594 Total: 2.6780; Orientation: 0.2992; Line Search: 1.8436
Adding measurement 5f389d72 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.554e+05, gradient 3.328e-01, dot -0.179; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1326.7867171604594, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 5f389d72 to history. Total: 3
th(0)=-1326.7867171604594;dx=-0.11059130686631707
Armijo: th(30296.737828573387)=-890.5687306336337; dx=0.004735274096049763 evalInputDelta=-436.2179865268257
New Minimum: -1326.7867171604594 > -1402.457180421524
END: th(15148.368914286693)=-1402.457180421524; dx=-0.01001219007216144 evalInputDelta=75.6704632610647
Fitness changed from -1326.7867171604594 to -1402.457180421524
Iteration 13 complete. Error: -1402.457180421524 Total: 3.0625; Orientation: 0.3202; Line Search: 2.1824
Adding measurement 6a4c764c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.790e+06, gradient 3.323e-01, dot -0.179; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1402.457180421524, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 6a4c764c to history. Total: 3
th(0)=-1402.457180421524;dx=-0.11025547389542928
Armijo: th(32636.171486339877)=-868.6449011424517; dx=0.0064385895637529165 evalInputDelta=-533.8122792790724
New Minimum: -1402.457180421524 > -1464.0951841471644
END: th(16318.085743169939)=-1464.0951841471644; dx=-0.01008194101683485 evalInputDelta=61.638003725640374
Fitness changed from -1402.457180421524 to -1464.0951841471644
Iteration 14 complete. Error: -1464.0951841471644 Total: 2.7629; Orientation: 0.2915; Line Search: 1.9274
Adding measurement 127e90b2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.003e+04, gradient 3.393e-01, dot -0.018; [70305a75-482b-40f3-9874-f45e294425eb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1464.0951841471644, -337.670318254979, -235.2379397198418, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 127e90b2 to history. Total: 3
th(0)=-1464.0951841471644;dx=-0.11508050840520723
Armijo: th(35156.25000000003)=-921.0761178491931; dx=0.00521487013359931 evalInputDelta=-543.0190662979713
New Minimum: -1464.0951841471644 > -1533.205807947188
END: th(17578.125000000015)=-1533.205807947188; dx=-0.00957106844692207 evalInputDelta=69.11062380002363
Fitness changed from -1464.0951841471644 to -1533.205807947188
Iteration 15 complete. Error: -1533.205807947188 Total: 2.6712; Orientation: 0.3021; Line Search: 1.7994
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/ebfa7714-e000-440a-a5b9-10aab6e05860.jpg)
Final threshold in iteration 16: -1533.205807947188 (> -Infinity) after 43.630s (< 5400.000s)
Returns
-1533.205807947188