BasicOptimizer.scala:89 executed in 2281.30 seconds (11.965 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: 11576294915809
Reset training subject: 11625475664185
Adding measurement 5932326a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-4.85074782371521;dx=-2.326824161542444E-7
New Minimum: -4.85074782371521 > -4.850748360157013
END: th(2.154434690031884)=-4.850748360157013; dx=-2.0498501538482444E-7 evalInputDelta=5.364418029785156E-7
Fitness changed from -4.85074782371521 to -4.850748360157013
Iteration 1 complete. Error: -4.850748360157013 Total: 245.9141; Orientation: 0.0880; Line Search: 98.7031
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d77c646e-ca81-46d2-a403-4aee1f82b52f.jpg)
Adding measurement 174f0c46 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-4.850748360157013;dx=-2.2326812251207525E-7
New Minimum: -4.850748360157013 > -4.850749507546425
WOLFE (weak): th(4.641588833612779)=-4.850749507546425; dx=-2.2683967031040534E-7 evalInputDelta=1.1473894119262695E-6
New Minimum: -4.850749507546425 > -4.850750625133514
WOLFE (weak): th(9.283177667225559)=-4.850750625133514; dx=-2.2677981258257166E-7 evalInputDelta=2.2649765014648438E-6
New Minimum: -4.850750625133514 > -4.850755453109741
WOLFE (weak): th(27.849533001676676)=-4.850755453109741; dx=-2.2669307669936995E-7 evalInputDelta=7.092952728271484E-6
New Minimum: -4.850755453109741 > -4.850776672363281
WOLFE (weak): th(111.3981320067067)=-4.850776672363281; dx=-2.2738001174367802E-7 evalInputDelta=2.8312206268310547E-5
New Minimum: -4.850776672363281 > -4.850889831781387
WOLFE (weak): th(556.9906600335335)=-4.850889831781387; dx=-2.2661761781013988E-7 evalInputDelta=1.4147162437438965E-4
New Minimum: -4.850889831781387 > -4.851595357060432
WOLFE (weak): th(3341.9439602012008)=-4.851595357060432; dx=-2.272443506134564E-7 evalInputDelta=8.469969034194946E-4
New Minimum: -4.851595357060432 > -4.856667831540108
WOLFE (weak): th(23393.607721408407)=-4.856667831540108; dx=-2.2562158507680785E-7 evalInputDelta=0.005919471383094788
New Minimum: -4.856667831540108 > -4.897345274686813
WOLFE (weak): th(187148.86177126726)=-4.897345274686813; dx=-2.182362517291195E-7 evalInputDelta=0.046596914529800415
New Minimum: -4.897345274686813 > -5.202945232391357
END: th(1684339.7559414054)=-5.202945232391357; dx=-1.419233966288135E-7 evalInputDelta=0.3521968722343445
Fitness changed from -4.850748360157013 to -5.202945232391357
Iteration 2 complete. Error: -5.202945232391357 Total: 542.0214; Orientation: 0.0879; Line Search: 491.7588
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/94b75631-3081-4c71-91cc-3337fc538a93.jpg)
Adding measurement b4bd834 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-5.202945232391357;dx=-1.1818998473940634E-7
New Minimum: -5.202945232391357 > -5.59782050549984
END: th(3628800.0000000005)=-5.59782050549984; dx=-7.797649375513347E-8 evalInputDelta=0.39487527310848236
Fitness changed from -5.202945232391357 to -5.59782050549984
Iteration 3 complete. Error: -5.59782050549984 Total: 147.8824; Orientation: 0.0939; Line Search: 98.3188
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9349a89c-7904-4f2c-8b56-9b2425629749.jpg)
Adding measurement 68cb61cc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.127e+04, gradient 2.732e-04, dot -0.743; [654388a7-8795-4043-a59a-a210a2a850f4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.59782050549984, -5.202945232391357, -4.850748360157013, -4.85074782371521
LBFGS Accumulation History: 3 points
Removed measurement 68cb61cc to history. Total: 3
th(0)=-5.59782050549984;dx=-6.813054774343661E-8
New Minimum: -5.59782050549984 > -6.104352727532387
END: th(7818012.603187701)=-6.104352727532387; dx=-4.279747385113441E-8 evalInputDelta=0.506532222032547
Fitness changed from -5.59782050549984 to -6.104352727532387
Iteration 4 complete. Error: -6.104352727532387 Total: 151.2656; Orientation: 2.4336; Line Search: 98.4386
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/3e70fa70-2a76-4f1b-a942-5ebc222045fa.jpg)
Adding measurement 7732a1f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.103e+03, gradient 2.046e-04, dot -0.633; [654388a7-8795-4043-a59a-a210a2a850f4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.104352727532387, -5.202945232391357, -4.850748360157013, -4.85074782371521
LBFGS Accumulation History: 3 points
Removed measurement 7732a1f6 to history. Total: 3
th(0)=-6.104352727532387;dx=-4.0960028128194995E-8
New Minimum: -6.104352727532387 > -6.630079045891762
END: th(1.6843397559414055E7)=-6.630079045891762; dx=-1.9141645211799155E-8 evalInputDelta=0.525726318359375
Fitness changed from -6.104352727532387 to -6.630079045891762
Iteration 5 complete. Error: -6.630079045891762 Total: 151.5433; Orientation: 2.2285; Line Search: 99.5528
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a0692287-aafc-4d7f-9214-74430649c590.jpg)
Adding measurement 178656b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.855e+03, gradient 1.731e-04, dot -0.516; [654388a7-8795-4043-a59a-a210a2a850f4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.630079045891762, -5.202945232391357, -4.850748360157013, -4.85074782371521
LBFGS Accumulation History: 3 points
Removed measurement 178656b0 to history. Total: 3
th(0)=-6.630079045891762;dx=-2.994358190924735E-8
New Minimum: -6.630079045891762 > -6.981314599514008
WOLF (strong): th(3.628800000000001E7)=-6.981314599514008; dx=1.301164907053497E-9 evalInputDelta=0.3512355536222458
END: th(1.8144000000000004E7)=-6.953936666250229; dx=-6.708753025947918E-9 evalInputDelta=0.3238576203584671
Fitness changed from -6.630079045891762 to -6.981314599514008
Iteration 6 complete. Error: -6.981314599514008 Total: 198.7433; Orientation: 2.2453; Line Search: 147.0528
Adding measurement 1c5c7acd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.486e+03, gradient 2.438e-04, dot -0.167; [654388a7-8795-4043-a59a-a210a2a850f4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.981314599514008, -5.202945232391357, -4.850748360157013, -4.85074782371521
LBFGS Accumulation History: 3 points
Removed measurement 1c5c7acd to history. Total: 3
th(0)=-6.981314599514008;dx=-6.0571231287657E-8
New Minimum: -6.981314599514008 > -7.021419495344162
WOLF (strong): th(3.9090063015938506E7)=-7.021419495344162; dx=7.808200594040551E-9 evalInputDelta=0.04010489583015442
New Minimum: -7.021419495344162 > -7.2638605535030365
WOLF (strong): th(1.9545031507969253E7)=-7.2638605535030365; dx=3.637436689742254E-9 evalInputDelta=0.28254595398902893
END: th(6515010.502656418)=-7.255788564682007; dx=-1.5885446476474604E-8 evalInputDelta=0.27447396516799927
Fitness changed from -6.981314599514008 to -7.2638605535030365
Iteration 7 complete. Error: -7.2638605535030365 Total: 248.2559; Orientation: 2.2401; Line Search: 197.0649
Adding measurement 69933f28 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.510e+03, gradient 1.455e-04, dot -0.241; [654388a7-8795-4043-a59a-a210a2a850f4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.2638605535030365, -5.202945232391357, -4.850748360157013, -4.85074782371521
LBFGS Accumulation History: 3 points
Removed measurement 69933f28 to history. Total: 3
th(0)=-7.2638605535030365;dx=-2.075568950523176E-8
New Minimum: -7.2638605535030365 > -7.443209126591682
END: th(1.4036164632845048E7)=-7.443209126591682; dx=-4.819537982630624E-9 evalInputDelta=0.17934857308864594
Fitness changed from -7.2638605535030365 to -7.443209126591682
Iteration 8 complete. Error: -7.443209126591682 Total: 150.0591; Orientation: 2.2964; Line Search: 98.9830
Adding measurement 7fa4dc14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.314e+03, gradient 1.117e-04, dot -0.308; [654388a7-8795-4043-a59a-a210a2a850f4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.443209126591682, -5.202945232391357, -4.850748360157013, -4.85074782371521
LBFGS Accumulation History: 3 points
Removed measurement 7fa4dc14 to history. Total: 3
th(0)=-7.443209126591682;dx=-1.2434745260285568E-8
New Minimum: -7.443209126591682 > -7.5174123495817184
END: th(3.024000000000001E7)=-7.5174123495817184; dx=-1.416865653144938E-9 evalInputDelta=0.07420322299003601
Fitness changed from -7.443209126591682 to -7.5174123495817184
Iteration 9 complete. Error: -7.5174123495817184 Total: 148.7364; Orientation: 2.2349; Line Search: 98.0828
Adding measurement 34b8e2bc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.947e+03, gradient 2.378e-04, dot -0.159; [654388a7-8795-4043-a59a-a210a2a850f4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.5174123495817184, -5.202945232391357, -4.850748360157013, -4.85074782371521
LBFGS Accumulation History: 3 points
Removed measurement 34b8e2bc to history. Total: 3
th(0)=-7.5174123495817184;dx=-5.64093175467468E-8
Armijo: th(6.515010502656419E7)=-6.842467695474625; dx=1.1421756084388871E-8 evalInputDelta=-0.6749446541070938
Armijo: th(3.2575052513282094E7)=-7.341839581727982; dx=1.2060039797541192E-8 evalInputDelta=-0.17557276785373688
New Minimum: -7.5174123495817184 > -7.626136541366577
WOLF (strong): th(1.0858350837760698E7)=-7.626136541366577; dx=5.669438549221193E-9 evalInputDelta=0.1087241917848587
END: th(2714587.7094401745)=-7.62038491666317; dx=-1.567562886420293E-8 evalInputDelta=0.10297256708145142
Fitness changed from -7.5174123495817184 to -7.626136541366577
Iteration 10 complete. Error: -7.626136541366577 Total: 295.7957; Orientation: 2.2822; Line Search: 244.8409
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2c481621-057d-4460-bb86-acc3a3bb3ead.jpg)
Final threshold in iteration 11: -7.626136541366577 (> -Infinity) after 2281.304s (< 5400.000s)
Returns
-7.626136541366577