BasicOptimizer.scala:89 executed in 8.17 seconds (0.486 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: 149116772352000
Reset training subject: 149116903390000
Adding measurement 410cce42 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-4.631354013940352;dx=-0.13016379757796936
New Minimum: -4.631354013940352 > -4.748875535077357
WOLFE (weak): th(2.154434690031884)=-4.748875535077357; dx=-0.13219906201487627 evalInputDelta=0.11752152113700465
New Minimum: -4.748875535077357 > -4.865008948887341
WOLFE (weak): th(4.308869380063768)=-4.865008948887341; dx=-0.13240420355855353 evalInputDelta=0.23365493494698875
New Minimum: -4.865008948887341 > -5.332795632595834
WOLFE (weak): th(12.926608140191302)=-5.332795632595834; dx=-0.1307108226117153 evalInputDelta=0.7014416186554824
New Minimum: -5.332795632595834 > -7.230315484514851
END: th(51.70643256076521)=-7.230315484514851; dx=-0.11273714893507555 evalInputDelta=2.5989614705744994
Fitness changed from -4.631354013940352 to -7.230315484514851
Iteration 1 complete. Error: -7.230315484514851 Total: 0.9426; Orientation: 0.0016; Line Search: 0.5892
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/15a5f953-7b29-4adb-b359-6ada5e92fa81.jpg)
Adding measurement 63cacb31 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-7.230315484514851;dx=-0.13844012226798094
New Minimum: -7.230315484514851 > -13.264367141667382
WOLFE (weak): th(111.39813200670669)=-13.264367141667382; dx=-0.12480326922220192 evalInputDelta=6.0340516571525304
New Minimum: -13.264367141667382 > -19.988009100770892
END: th(222.79626401341338)=-19.988009100770892; dx=-0.09373233563295608 evalInputDelta=12.757693616256041
Fitness changed from -7.230315484514851 to -19.988009100770892
Iteration 2 complete. Error: -19.988009100770892 Total: 0.4709; Orientation: 0.0014; Line Search: 0.3469
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/bfe87525-57f5-4328-907f-d52538673ebc.jpg)
Adding measurement 5ca3e3c9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-19.988009100770892;dx=-0.364804417865654
New Minimum: -19.988009100770892 > -57.64411500006419
END: th(480.0)=-57.64411500006419; dx=-0.05161504727750549 evalInputDelta=37.656105899293294
Fitness changed from -19.988009100770892 to -57.64411500006419
Iteration 3 complete. Error: -57.64411500006419 Total: 0.3457; Orientation: 0.0015; Line Search: 0.2247
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/68c2c115-c925-40fd-951d-353c05e689e6.jpg)
Adding measurement 2018fc3d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.261e+03, gradient 5.555e-01, dot -0.061; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -57.64411500006419, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 2018fc3d to history. Total: 3
th(0)=-57.64411500006419;dx=-0.3048740193440958
Armijo: th(1034.1286512153042)=-54.99994895239108; dx=0.015115475325220428 evalInputDelta=-2.64416604767311
New Minimum: -57.64411500006419 > -91.4205277310572
END: th(517.0643256076521)=-91.4205277310572; dx=-0.01142755269682345 evalInputDelta=33.776412730993016
Fitness changed from -57.64411500006419 to -91.4205277310572
Iteration 4 complete. Error: -91.4205277310572 Total: 0.4936; Orientation: 0.0269; Line Search: 0.3448
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/4779068f-b53f-4234-ab94-bc6318162871.jpg)
Adding measurement 1669f2a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.278e+02, gradient 5.733e-01, dot -0.042; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.4205277310572, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 1669f2a2 to history. Total: 3
th(0)=-91.4205277310572;dx=-0.3278554770199813
New Minimum: -91.4205277310572 > -104.83093252500666
WOLF (strong): th(1113.981320067067)=-104.83093252500666; dx=0.014747161823733389 evalInputDelta=13.410404793949454
New Minimum: -104.83093252500666 > -127.04876493644085
WOLF (strong): th(556.9906600335335)=-127.04876493644085; dx=0.02416801142703604 evalInputDelta=35.62823720538364
END: th(185.66355334451114)=-126.36335412462348; dx=-0.1056592819636916 evalInputDelta=34.94282639356628
Fitness changed from -91.4205277310572 to -127.04876493644085
Iteration 5 complete. Error: -127.04876493644085 Total: 0.5996; Orientation: 0.0277; Line Search: 0.4514
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/25b709b1-62bc-4d8b-b915-3dff56080591.jpg)
Adding measurement 26762f9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.762e+02, gradient 5.081e-01, dot -0.042; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -127.04876493644085, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 26762f9c to history. Total: 3
th(0)=-127.04876493644085;dx=-0.2551496567260161
New Minimum: -127.04876493644085 > -173.07159600509263
END: th(400.0)=-173.07159600509263; dx=-0.05127776614243229 evalInputDelta=46.02283106865178
Fitness changed from -127.04876493644085 to -173.07159600509263
Iteration 6 complete. Error: -173.07159600509263 Total: 0.3826; Orientation: 0.0286; Line Search: 0.2299
Adding measurement 5a0219ce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.073e+02, gradient 3.762e-01, dot -0.126; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -173.07159600509263, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 5a0219ce to history. Total: 3
th(0)=-173.07159600509263;dx=-0.13834929598090737
New Minimum: -173.07159600509263 > -191.66734488104643
END: th(861.7738760127535)=-191.66734488104643; dx=-0.0028222876190674706 evalInputDelta=18.595748875953802
Fitness changed from -173.07159600509263 to -191.66734488104643
Iteration 7 complete. Error: -191.66734488104643 Total: 0.3962; Orientation: 0.0270; Line Search: 0.2585
Adding measurement 253054c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.062e+03, gradient 5.934e-01, dot -0.041; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -191.66734488104643, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 253054c to history. Total: 3
th(0)=-191.66734488104643;dx=-0.3471187109376872
Armijo: th(1856.6355334451116)=-120.30934249103434; dx=0.003321325488525038 evalInputDelta=-71.35800239001209
Armijo: th(928.3177667225558)=-181.29463889963762; dx=0.02988968499152276 evalInputDelta=-10.372705981408814
New Minimum: -191.66734488104643 > -221.38923055616323
END: th(309.43925557418527)=-221.38923055616323; dx=-0.06678524006424409 evalInputDelta=29.721885675116795
Fitness changed from -191.66734488104643 to -221.38923055616323
Iteration 8 complete. Error: -221.38923055616323 Total: 0.6026; Orientation: 0.0280; Line Search: 0.4598
Adding measurement 74536c64 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.263e+03, gradient 4.316e-01, dot -0.051; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -221.38923055616323, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 74536c64 to history. Total: 3
th(0)=-221.38923055616323;dx=-0.1838715164018268
New Minimum: -221.38923055616323 > -238.2832151558309
END: th(666.6666666666667)=-238.2832151558309; dx=-0.059453757826918516 evalInputDelta=16.893984599667675
Fitness changed from -221.38923055616323 to -238.2832151558309
Iteration 9 complete. Error: -238.2832151558309 Total: 0.3919; Orientation: 0.0278; Line Search: 0.2505
Adding measurement c4a4e47 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.621e+03, gradient 5.083e-01, dot -0.070; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -238.2832151558309, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement c4a4e47 to history. Total: 3
th(0)=-238.2832151558309;dx=-0.2553712740463119
Armijo: th(1436.2897933545894)=-216.6382262984767; dx=0.010691020273606912 evalInputDelta=-21.644988857354207
New Minimum: -238.2832151558309 > -278.3195246699376
END: th(718.1448966772947)=-278.3195246699376; dx=-0.02347178792714736 evalInputDelta=40.036309514106705
Fitness changed from -238.2832151558309 to -278.3195246699376
Iteration 10 complete. Error: -278.3195246699376 Total: 0.4821; Orientation: 0.0282; Line Search: 0.3413
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f10f5faa-825e-44f0-8ea6-4f27ebc02770.jpg)
Adding measurement 39f4c222 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.008e+03, gradient 5.532e-01, dot -0.047; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -278.3195246699376, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 39f4c222 to history. Total: 3
th(0)=-278.3195246699376;dx=-0.3019276366339079
New Minimum: -278.3195246699376 > -309.20606498741256
WOLF (strong): th(1547.1962778709267)=-309.20606498741256; dx=0.014205455030911942 evalInputDelta=30.886540317474953
New Minimum: -309.20606498741256 > -337.5908211133709
END: th(773.5981389354633)=-337.5908211133709; dx=-0.017911676558177537 evalInputDelta=59.2712964434333
Fitness changed from -278.3195246699376 to -337.5908211133709
Iteration 11 complete. Error: -337.5908211133709 Total: 1.0206; Orientation: 0.0311; Line Search: 0.8700
Adding measurement 678cf1f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.458e+03, gradient 6.161e-01, dot -0.066; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -337.5908211133709, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 678cf1f6 to history. Total: 3
th(0)=-337.5908211133709;dx=-0.3736222476229366
Armijo: th(1666.6666666666672)=-201.19181029865504; dx=0.03818482524851735 evalInputDelta=-136.39901081471587
Armijo: th(833.3333333333336)=-303.6741803520675; dx=0.0343730223349591 evalInputDelta=-33.91664076130343
New Minimum: -337.5908211133709 > -367.51062909798947
END: th(277.7777777777779)=-367.51062909798947; dx=-0.11023961981023664 evalInputDelta=29.919807984618558
Fitness changed from -337.5908211133709 to -367.51062909798947
Iteration 12 complete. Error: -367.51062909798947 Total: 0.5955; Orientation: 0.0265; Line Search: 0.4574
Adding measurement 458adf84 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.457e+04, gradient 5.356e-01, dot -0.080; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -367.51062909798947, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 458adf84 to history. Total: 3
th(0)=-367.51062909798947;dx=-0.28306104720901293
Armijo: th(598.4540805644124)=-327.84490426114604; dx=-0.0018340695542728488 evalInputDelta=-39.665724836843424
New Minimum: -367.51062909798947 > -370.5812157948646
END: th(299.2270402822062)=-370.5812157948646; dx=-0.10427013006326713 evalInputDelta=3.070586696875125
Fitness changed from -367.51062909798947 to -370.5812157948646
Iteration 13 complete. Error: -370.5812157948646 Total: 0.4780; Orientation: 0.0282; Line Search: 0.3392
Adding measurement 74dc6359 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.037e+04, gradient 5.189e-01, dot -0.101; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -370.5812157948646, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 74dc6359 to history. Total: 3
th(0)=-370.5812157948646;dx=-0.2639734834124476
Armijo: th(644.6651157795529)=-348.9304976460212; dx=0.006649440241963475 evalInputDelta=-21.650718148843396
New Minimum: -370.5812157948646 > -386.07550670173316
END: th(322.33255788977647)=-386.07550670173316; dx=-0.08128654621487667 evalInputDelta=15.49429090686857
Fitness changed from -370.5812157948646 to -386.07550670173316
Iteration 14 complete. Error: -386.07550670173316 Total: 0.4765; Orientation: 0.0281; Line Search: 0.3385
Adding measurement 4461aa1a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.461e+04, gradient 5.313e-01, dot -0.092; [c9625b90-84e9-403d-8aa1-78f4948912f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -386.07550670173316, -19.988009100770892, -7.230315484514851, -4.631354013940352
LBFGS Accumulation History: 3 points
Removed measurement 4461aa1a to history. Total: 3
th(0)=-386.07550670173316;dx=-0.277576294808562
Armijo: th(694.4444444444448)=-348.45109278419545; dx=0.030288167625503085 evalInputDelta=-37.62441391753771
New Minimum: -386.07550670173316 > -388.1683953196087
END: th(347.2222222222224)=-388.1683953196087; dx=-0.00836266791908442 evalInputDelta=2.0928886178755306
Fitness changed from -386.07550670173316 to -388.1683953196087
Iteration 15 complete. Error: -388.1683953196087 Total: 0.4810; Orientation: 0.0281; Line Search: 0.3443
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/24664819-0424-45b0-8ba2-0207aacbcd23.jpg)
Final threshold in iteration 16: -388.1683953196087 (> -Infinity) after 8.170s (< 5400.000s)
Returns
-388.1683953196087